倒计时进入页面的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>

发表评论

邮箱地址不会被公开。 必填项已用*标注

click to changeSecurity Code