純 html 以及 js 多域名跳轉


<!--將如下的 endv.cn 改爲要跳轉的域名-->
第一種:單域名的跳轉

1:域名在服務器端跳轉javascript

1 Response.Redirect(http://endv.cn)
2 Response.End

 


二、若是你的域名要在客戶端跳轉,能夠這樣:html

<script language="javascript" type="text/javascript">
window.location="http://endv.cn";;
</script>

  


3:若是你要讓域名頁面顯示幾秒鐘以後跳轉,能夠在html代碼的<head></head>部分加上這樣的域名跳轉代碼:
<meta http-equiv="refresh" content="3; url=http://endv.cn">
以上三種是也比較常見,比較經常使用的免費域名跳轉代碼運行平臺Win9x WinNT Win2000 WinME WinXP。
4:不隱藏域名跳轉以後的地址 java

1 <html>
2 <body>
3 <meta http-equiv="refresh" content="0.1;url=endv.cn">
4 </body>
5 </html> 

 


5:可隱藏域名跳轉以後的地址:服務器

<html>
<frameset framespacing="0" border="0" rows="0" frameborder="0">
<frame name="main" src="endv.cn" scrolling="auto" noresize>
</frameset>
</html> 

 


6:定時的域名跳轉代碼微信

<meta http-equiv="refresh" content="3;rul=http://endv.cn">

 


此代碼能夠讓網頁在必定的時間內,跳轉到另一個網頁上,其中content=" 爲跳轉前停暫的秒數,rul= 爲跳轉的域名ui

<meta http-equiv="refresh" content="3;rul=http://endv.cn">

 


此代碼能夠讓網頁在必定的時間內,跳轉到另一個網頁上,其中content=" 爲跳轉前停暫的秒數,rul= 爲跳轉的域名。url


第二種:多域名的跳轉spa

 

<script>try {if( self.location == "http://cnblogs.com/endv" ) { 
top.location.href = "http://域名一/目錄"; 
} 
else if( self.location == "http://域名二/" ) { 
top.location.href = "http://域名二/目錄"; 
} 
else if( self.location == "http://域名三/" ) { 
top.location.href = "http://域名三/目錄"; 
} 
else if( self.location == "http://域名四/" ) { 
top.location.href = "http://域名四/目錄"; 
} 
else {document.write ("錯誤的訪問地址")}} catch(e) {}</script> 

 

多域名跳轉完整示例:(如下域名看好的可微信掃碼…^  ^……)code

<!DOCTYPE HTML>  
<!-- -頭部頁面描述:START -->
<!DOCTYPE html PUBLIC "" "">
<HTML lang="en">
<HEAD>
<META charset="UTF-8"> 
<TITLE>天雲信息</TITLE>
<script>try {
/*  ajerp.com  */
if( self.location == "http://ajerp.com" ) { 
top.location.href = "/all/";                   // 這裏跳轉到目錄
} 
else if( self.location == "http://endv.club/" ) { 
top.location.href = "/all/"; 
} 
else if( self.location == "http://endv.cn/" ) { 
top.location.href = "https://code.endv.cn/"; 
} 
/*  ajerp.com  */
else if( self.location == "http://endv.top/" ) { 
top.location.href = "/all/"; 
} 
else if( self.location == "http://globaladmin.cn/" ) { 
top.location.href = "/all/"; 
} 
else if( self.location == "http://liulaisheng.cn/" ) { 
top.location.href = "/all/"; 
} 
else if( self.location == "http://suqianbao.cn/" ) { 
top.location.href = "/all/"; 
}
else if( self.location == "https://tianyun.pub/" ) { 
top.location.href = "/all/"; 
} 
else if( self.location == "https://tianyun.space/" ) { 
top.location.href = "/endv.cn/"; 
} 
else  if( self.location == "https://ajerp.com" ) { 
top.location.href = "https://www.endv.cn/all/";
}  
else if( self.location == "https://endv.club/" ) { 
top.location.href = "https://www.endv.cn/all/";  
}  
else if( self.location == "https://endv.cn/" ) { 
top.location.href = "https://www.endv.cn/all/";  
}  
else if( self.location == "https://endv.top/" ) { 
top.location.href = "./all/";                      
}
else if( self.location == "https://globaladmin.cn/" ) { 
top.location.href = "/all/"; 
}  
else if( self.location == "https://liulaisheng.cn/" ) { 
top.location.href = "/all/"; 
}  
else if( self.location == "https://suqianbao.cn/" ) { 
top.location.href = "/all/"; 
}  
else if( self.location == "https://tianyun.pub/" ) { 
top.location.href = "/all/"; 
}  
else if( self.location == "https://tianyun.space/" ) { 
top.location.href = "/endv.cn/"; 
}  
else {
 var str = server.htmlEncode("<p><ahref='https://www.endv.cn'>天雲信息</a></p>");
    document.write(str);
//document.write ("錯誤的訪問地址")
}
} catch(e) {}</script> 
</HEAD> 
</HTML> 
相關文章
相關標籤/搜索