加载loading效果,设置时间

<html>
<head>
<title>
asdf
</title>
<script>
i=0;
function a(){
 i=i+1;
 if(i<=1){
  document.getElementById("span1").innerHTML="<img src=http://www.siyuroom.com/images/loading.gif>";
  window.setTimeout("a()",3000);
 }else{
  document.getElementById("span1").innerHTML="";  
 }
}
</script>
<body onload=a()>
<span id="span1">asfd</span>
</body>
</html>

    A+
发布日期:2010年04月03日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: