检测用户来源js 参考

参考

<script>

function swt(){

var r=document.referrer;

var p=window.location.href;   //当前页面地址

if(r==null || r==''){}

var e=window.location.search;

if(e!=null && e!=""){

e=e.replace("?from","&e");   //搜索引擎

}else{

}

var swturl="http://ppzttest.cn/";

swturl=swturl+"&r="+encodeURIComponent(r)+"&p="+encodeURIComponent(p)+e;

window.open(swturl);

}

</script>

posted @ 2015-04-23 11:43  mrt_yy  阅读(196)  评论(0编辑  收藏  举报