js 多域名跳转

<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> 


html

 

你可能感兴趣的:(js)