亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

網(wǎng)站404頁面3秒后跳到首頁的實(shí)例代碼

 更新時間:2013年08月16日 15:34:36   作者:  
我們看到很多網(wǎng)站會有有錯誤404頁面,當(dāng)頁面不存存時就會提示,然后過幾秒就會自動跳到首頁了,下面我來給大家舉一個404錯誤頁面跳到首頁實(shí)例,各位可參考,有需要的朋友可以參考一下
復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>404 Not Found</title>
</head>
<body>
 <h1>找不到指定的頁面</h1>
 <span id="totalSecond">3</span>秒后自動返回
</body>
<script language="javascript" type="text/javascript">
<!--
    var second = document.getElementById('totalSecond').textContent;
    if (navigator.appName.indexOf("Explorer") > -1)  //判斷是IE瀏覽器還是Firefox瀏覽器,采用相應(yīng)措施取得秒數(shù)
    {
        second = document.getElementById('totalSecond').innerText;
    } else
    {
        second = document.getElementById('totalSecond').textContent;
    }
    setInterval("redirect()", 1000);  //每1秒鐘調(diào)用redirect()方法一次
    function redirect()
    {
        if (second < 0)
        {
            location.href = 'http://要跳轉(zhuǎn)的網(wǎng)站';
        } else
        {
            if (navigator.appName.indexOf("Explorer") > -1)
            {
                document.getElementById('totalSecond').innerText = second--;
            } else
            {
                document.getElementById('totalSecond').textContent = second--;
            }
        }
    }
-->
</script>
</html></td>
   </tr>
 </table>

相關(guān)文章

最新評論