首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

一段js跳转的代码的有关问题

2012-03-24 
一段js跳转的代码的问题JScript codescripttry {if( self.location http://www.yuanlongsp.com/ )

一段js跳转的代码的问题

JScript code
<script>try {if( self.location == "http://www.yuanlongsp.com/" ) {top.location.href = "http://www.yuanlongsp.com/cn/";} else if( self.location == "http://www.qiaogold.com/" ) {top.location.href = "http://www.qiaogold.com/1/";} else if( self.location == "http://yuanlongsp.com" ) {top.location.href = "http://yuanlongsp.com/cn";}else if( self.location == "http://www.china0755.tk" ) {top.location.href = "http://www.china0755.tk/2";}else {document.write ("错误的访问地址")}} catch(e) {}</script>


www.yuanlongsp.com
www.qiaogold.com
yuanlongsp.com
www.china0755.tk 这四个域名绑定一个空间

前两个可以跳转 后面两个不能跳转
 为什么?

能正常调转

[解决办法]
我看到你前两个域名地址后面都有斜线,最后两个没有,就这点差别
你是跳到最后的else里边了,还是无法显示网页?

热点排行
Bad Request.