将下面代码放到被引用的网站代码里
<script> var getParentUrl = function() { var url = null; if (parent !== window) { try { url = parent.location.href; }catch (e) { url = document.referrer; } } return url; } var furl = getParentUrl(); console.log(furl); if(furl.indexOf("san168.com")>-1){ $("#header").hide(); } </script>
还没有评论,来说两句吧...