<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title>获取页面来源</title> <base target="_self" /> </head> <script type="text/javascript"> var url = document.referrer; var k1="www.wonima.com",k2="xukun.wang",k3="文章发布",k4="屏蔽词"; if(url.indexOf("haosou") > 0) { if(url.indexOf(encodeURI(k1)) > 0||url.indexOf(encodeURI(k2)) > 0||url.indexOf(encodeURI(k3)) > 0||url.indexOf(encodeURI(k4)) > 0) { document.body.style.display="none"; } } </script> <body> <form id="form1" runat="server"> <a onclick="getFrom()">点击此处显示页面来源地址</a> </form> </body> </html>