網(wǎng)頁自動跳轉代碼方法很多,在這里中國企業(yè)商會專門為大家收集整理了最全的網(wǎng)頁自動跳轉代碼方法,希望可以幫助大家實現(xiàn)網(wǎng)頁自動跳轉。
1、html網(wǎng)頁跳轉代碼
在網(wǎng)頁頭部<1head>…</head>之間插入以下代碼
<meta http-equiv="refresh" content="7;url=http://www.dgyhc.com">,其中:content="7 為打開該頁面后多久時間開始跳轉,url=后面跟上你要跳轉的網(wǎng)址或者網(wǎng)頁地址。
2、js跳轉代碼
在網(wǎng)頁<body>…</body>之間插入以下代碼。
<script language='javascript'>document.location = 'http://www.dgyhc.com'</script>
3、asp網(wǎng)頁跳轉代碼
<%
Response.Redirect("http://www.dgyhc.com")
Response.End
%>
4、php網(wǎng)頁跳轉代碼
<?php
header("location: http://www.dgyhc.com");
>