ajax提交等待问题
我做了个简单的注册时,自动查找用户名是否可用的例子,实现了。但是我现在想当正在查找数据库时,显示一张正在等待的图片,这个怎么实现呢?谢谢。
我的一些代码
function checkUserNameResult()
{
if(xmlHttp.readyState==4)
{
if(xmlHttp.status==200)
{
if(xmlHttp.responseText=="true")
{
document.getElementById("imgflag").src="false.GIF";
}
else
{
document.getElementById("imgflag").src="true.GIF";
}
}
}
}