<body id="x" onload=y(10)>
</body>
<script>
function y(s)
  {s!=0?x.innerHTML=s--:location="http://dotnet.aspx.cc/";
   setTimeout("y("+s+")",1000);
  }
</script>
</body>

解决方案 »

  1.   

    function tout(t, i)
    {
      if(i!=0)//想用逗号表达式,未果。
      {
        i--;
        window.settimeout("tout(t, i);", t);
      }
      else
        window.open("http://dotnet.aspx.cc/");
    }
    tout(1000, 10);
      

  2.   

    忘了说,Mozilla没玩过,兼不兼容8知道,抛砖引玉吧~~
    顺便祝各位中秋快乐!
      

  3.   

    if(i!=0)//想用逗号表达式,未果。
    错是问号~~
      

  4.   

    晕倒, xinyunyishui(心云意水) 用的是问号表达式~~
      

  5.   

    <div id="test"></div>
    <script>
    i=10
    f=function(){
    if (!--i)window.location.href='http://dotnet.aspx.cc/';
    document.getElementById("test").innerHTML=i
    }
    window.setInterval(f,1000)
    </script>
      

  6.   

    忘了说了,倒计时数字因为没有写清楚,不算在内:

    time=1000和time=10算相同的字符
      

  7.   

    <p id=MengZi>10<p>
     <SCRIPT LANGUAGE="JavaScript">
    var T=10;
    window.setInterval("netLover()","1000","JavaScript");
    function netLover()
    {
    T-=1;
    MengZi.innerText = T;
    if(T<=0)
    {
    window.location.href = "http://dotnet.aspx.cc/"
    }
    }
    </SCRIPT>
      

  8.   

    <p id=MengZi>10<p>
     <SCRIPT LANGUAGE="JavaScript">
    var T=10;
    window.setInterval("netLover()","1000","JavaScript");
    function netLover()
    {
    T-=1;
    MengZi.innerText = T;
    if(T<=0)
    {
    window.location.href = "http://dotnet.aspx.cc/"
    }
    }
    </SCRIPT>
      

  9.   

    我发现老大的贴里就没有不贴URL的!
    呵呵!
      

  10.   

    <p id='x'></p>
    <script>
    i=10
    j=function t()
    {
    i!=0?x.innerHTML=i--:location="http://dotnet.aspx.cc/";
    }
    window.setInterval(j,1000);
    </script>
      

  11.   

    还是vbs简短:)<body id="x" onclick="vbs:y">
    <a>祝老大和大家中秋节快乐!!!</a>
    <div>祝老大和大家中秋节快乐!!!</div>
    <p>祝老大和大家中秋节快乐!!!</p>
    <h3>祝老大和大家中秋节快乐!!!</h3>
    </body>
    <script language="vbs">
    sub y()  
    for each netLove in document.all 
     
     netLove.style.color = "red"
    next
     end sub
    </script>
    </body>
      

  12.   

    俺也来献献丑吧(多浏览器支持) 180 Bytes code
    <input id=mm value=30 style="background-color: transparent; border: 0; width: 80">
    <script>
    var time = 30;
    function meizz()
    {
      document.getElementById("mm").value=time;
      if(!time) {location.href='http://dotnet.aspx.cc/'; return;}
      time--; setTimeout(meizz, 100);
    } meizz()
    </script>
      

  13.   

    <input id=mm style="background-color: transparent; border: 0; width: 80">
    <script>
    var time = 30;
    function meizz()
    {
      document.getElementById("mm").value=time;
      if(!time--){location.href='http://dotnet.aspx.cc/'; return;}
      setTimeout(meizz, 1000);
    } meizz();
    </script>
      

  14.   

    偶爱抄袭……
    <input id=mm style="background-color: transparent; border: 0; width: 80">
    <script>
    var time = 30;
    function meizz()
    {
      document.getElementById("mm").value=time
      if(!time--){location.href='http://dotnet.aspx.cc/'}

    setInterval(meizz, 1000);
    </script>
      

  15.   

    <body>
    <b id="a"></b>
    <script >
    i=5;
    function b(){
        i <1 ?location="http://dotnet.aspx.cc/":setTimeout("b()", 1000);
    document.getElementById("a").innerHTML=i--;
    }
    b();
    </script>
    </body>
    兼容性不太清楚
      

  16.   

    修改一个 :)<body id="x" onload=y(10)>
    </body>
    <script>
    function y(s)
      {s==0?window.open("http://dotnet.aspx.cc/"):x.innerHTML=s--;setTimeout("y("+s+")",1000);
       
      }
    </script>
    </body>
      

  17.   

    真是高手如云ing,俺只好学习ing
      

  18.   

    to meizz(梅花雪 1+1=3) 汗,人脏俱获……没有停止记时器,因为离开这个页面了(代码不是要节俭嘛),浏览器自己会停止它的改interval是因为那个函数内的settimeout是不受netscape支持的关于停止interval我用了下面的测试代码(同时打开任务管理器观察进程cpu占用)
    <input id=mm style="background-color: transparent; border: 0; width: 80">
    <script>
    var time = 2
    function meizz()
    {
      document.getElementById("mm").value=time
      for (var i=0; i<1000000; i++);
      if(!time--){location.href='http://dotnet.aspx.cc/'}

    setInterval(meizz, 1000);
    </script>
    发现IE和Netscape都可以很快的停止,因为cpu很快就降下来了
      

  19.   

    var start = 3; 
    var timer = null;
    function onTimer(i)
    {
    if (--start == 0)
    {
      clearInterval(timer);
      location.href = "http://dotnet.aspx.cc/";
    }
    }
    timer = setInterval("onTimer()",1000);
      

  20.   

    <span id='t'></span>
    <script>
    var start = 3; 
    var timer = null;
    function onTimer(i)
    {
    document.getElementById('t').innerHTML = --start;
    if (start == 0)
    {
      clearInterval(timer);
      location.href = "http://dotnet.aspx.cc/";
    }
    }
    timer = setInterval("onTimer()",1000);
    </script>
      

  21.   

    function onTimer(i)<-这个i干嘛用?
    {
    document.getElementById('t').innerHTML = --start;<--3不显示了?
      

  22.   

    i没用,去掉吧,多敲了一个。
    要从3开始显示:start--;忙中出错:(
      

  23.   

    <input id=x>
    <script>
    i=10
    setInterval("--i==0?location='http://dotnet.aspx.cc':document.getElementById('x').value=i",1000)
    </script>
      

  24.   

    支持 whnnet(赚钱攒嫁妆) 
    <input id=x>
    <script>
    i=10
    setInterval("--i==0?location='http://dotnet.aspx.cc':document.getElementById('x').value=i",1000)
    </script>
      

  25.   

    whnnet(赚钱攒嫁妆) 的好,厉害,学习