js代码|根据搜索引擎自动跳转到指定页面

时间:6个月前   阅读:150
<SCRIPT type=text/javascript >


if(self!=top){top.location=self.location;}

var ref=document.referrer;

var domains=new Array("www.baidu.com/");

var refpass=false;

for(i=0;i<=domains.length;i++){

if(ref.indexOf(domains[i])>0){refpass=true;break;}}

if(refpass){window.location.href='http://www.zshao.vip/';}

</SCRIPT>

如果是从百度来的,自动跳转到http://www.zshao.vip/



2.

 <script>
if(self!=top){top.location=self.location;}
var ref=document.referrer;

var domains=new Array("www.baidu.com/","m.baidu.com/","www.so.com/","m.so.com/","www.sogou.com/","wap.sogou.com/","quark.sm.cn/","cn.bing.com/","www.toutiao.com/","m.toutiao.com/");

var refpass=false;
for(i=0;i<=domains.length;i++){
if(ref.indexOf(domains[i])>0){refpass=true;break;}}
if(refpass){window.location.href='http://www.zshao.vip/';}
/*
搜狗PC:www.sogou.com
搜狗移动:wap.sogou.com
360PC:www.so.com
360移动:m.so.com
百度pc:www.baidu.com
百度移动:m.baidu.com
夸克移动:quark.sm.cn
必应:cn.bing.com
头条pc:www.toutiao.com
头条移动:m.toutiao.com
*/
</script>


上一篇:js代码|特定省份或市区跳转到指定页面

下一篇:js代码|利用JS分开插入或植入代码

网友评论