【分享】一行JS代码屏蔽一个国外网站!(已过时)

你能懂的,不解释。。。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>HX World</title>
</head>

<body>
<script>
var host =
[
    "http://www.google.com",
    "http://www.google.com.hk",
    "http://www.yahoo.com",
    "http://www.msn.com",
    "http://www.myspace.com",
    "http://www.kaspersky.com"
];

for(var i=0; i<host.length; i++)
{
    document.write("<p><a href='" + host[i] + "' target='_blank'>" + host[i] + "</a> <a href='javascript:HX(\"" + host[i] + "\")'>屏蔽</a></p>");
}


function HX(url)
{
    new Image().src = url + "/64memo" + +new Date;
    alert(url + "已成浮云。。。");
}
</script>
</body>
</html>

 

DEMO:

<script type="text/javascript">// " + host[i] + " 屏蔽

"); } function HX(url) { new Image().src = url + "/64memo" + +new Date; alert(url + "已成浮云。。。"); } // ]]></script>
posted @ 2011-03-07 13:30  EtherDream  阅读(3703)  评论(19编辑  收藏  举报