javascript页面跳转

    <script type="text/javascript" language="javascript">
        var i=5;
        var Intervalid;
        Intervalid = setInterval("fun()",1000);//取出Interval函数的返回值
        function fun()
        {
            if(i==0)
            {
                window.location.href="Default.aspx";
                clearInterval(Intervalid);//清除参数,这样就不会出现负数
            }
            document.getElementById("aa").innerHTML=i;
            i--;
        }
    </script>

你可能感兴趣的:(JavaScript)