<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<div id="rrr"></div>
<script language="javascript">
var i=0;
for(i=0;i<10000;i++)
       document.getElementById("rrr").innerHTML=i;

</script>
</body>
</html>

解决方案 »

  1.   

    好像
    rrr.innerHTML=i;就可以了吧
      

  2.   

    没有错误 从1-9999是瞬时完成的 所以咱们看不出
    你加个alert在里面应该就能看出变化了
      

  3.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head><body>
    <div id="rrr"></div>
    <script language="javascript">
    var i=0;
    function t(){
      if(i!=10000){
      i++;
      document.getElementById("rrr").innerHTML=i;
      }
      setTimeout("t()",100);
    }
    t();
    </script>
    </body>
    </html>