倒计时进入页面的JS,适合调整页,404页


<span id="totalSecond">5</span>

   秒后自动进入网站<script language="javascript" type="text/javascript">
    var second = document.getElementById('totalSecond').textContent;

    if (navigator.appName.indexOf("Explorer") > -1)
    {
        second = document.getElementById('totalSecond').innerText;
    } else
    {
        second = document.getElementById('totalSecond').textContent;
    }


    setInterval("redirect()", 1000);
    function redirect()
    {
        if (second < 0)
        {
            location.href = 'http://www.jqku.cn/';
        } else
        {
            if (navigator.appName.indexOf("Explorer") > -1)
            {
                document.getElementById('totalSecond').innerText = second--;
            } else
            {
                document.getElementById('totalSecond').textContent = second--;
            }
        }
    }
</script>

评论: 0 | 引用: 0 | 阅读: 80
发表评论
昵 称: 密 码:
网 址: 邮 箱:
验证码: 验证码图片 选 项:
内 容: