您所在的位置:首页 > 建站动态 > 技术知识 > 内容
  • 技术知识

判断搜索引擎跳转页面,直接打开时不能打开。

SDCMS模板堂 与 2018/5/28 10:53:30 发布此文章 人气:259   技术知识

第一个页面。只放一个JS即可。

<script type="text/javascript">
var regexp=/\.(sogou|so|haoso|soso|baidu|google|youdao|yahoo|bing|118114|biso|gougou|ifeng|ivc|sooule|niuhu|biso)(\.[a-z0-9\-]+){1,2}\//ig;
var where =document.referrer;
if(regexp.test(where))
{
window.location.href='http://www.xxxx.com/bbbb/aaa.html';
}
else
{
window.location.href='http://www.xxxx.com/';
}
</script>

第二个接收页面。

// Javascript Document
if (document.referrer!="http://www.xxxx.com/bbbb/")
{
window.location.href='http://www.xxxx.com/';
}
//document.write (document.referrer);


本文网址:http://www.sdmoban.com/jishuzhishi/416.html
  • 栏目分类
  • 热卖商品
更多>>
  • 建站动态
SDCMS模板堂 - 成功的竞争者应该经得起风雨,应该具有抗挫折的能力。在竞争中流泪是弱者,只有在困境中奋起,才能成为强者。

推荐模板