1

JS 3秒自动跳转

<div>
    邮箱验证成功!<br />
    <p style="font-size: 14px;"><i id="timeTipBoxID">4</i>秒后自动跳转,或点击自动跳转!</p>
</div>

<script language="JavaScript" type="text/javascript">
    function delayURL(url) {
        var delay = document.getElementById("timeTipBoxID").innerHTML;
        if(delay > 1) {
            delay--;
            document.getElementById("timeTipBoxID").innerHTML = delay;
        } else {
            window.top.location.href = url;
        }
        setTimeout("delayURL('" + url + "')", 1000);
    }
    delayURL("http://www.baidu.com");
</script>

YPHP
967 声望77 粉丝

免费好用的素材站:[链接]