在执行Ajax之前,先执行一个load方法,比如 $("#ID").val("加载中...")或者显示一个层
执行Ajax完毕后,在success里把上边的“加载中”去掉,把层隐藏掉
望采纳!
网易的代码:<p><FONT color="000000" face="Arial"><BR>
页面载入中,请等待</FONT></p>
<p><input type=text name=chart size=46 style="font-family:Arialfont-weight:boldercolor:blackbackground-color:#EAEAEApadding:0pxborder-style:none">
<br>
<input type=text name=percent size=46 style="font-family:Arialcolor:blackbackground-color:#EAEAEAtext-align:centerborder-width:mediumborder-style:none">
<script>var bar = 0
var line = "||"
var amount ="||"
count()
function count(){
bar= bar+2
amount =amount + line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",200)}
else
{window.location = "这里输入地址"}
}
</script>