一段恶心的代码
AABBC BY - 2008-10-31 9:34:00
前些日子百度的竞价广告上有个做股票的用了,现在发现在中国电信绿色上网的网站上也用上了,就是打开子窗口的时候父窗口也会变成子窗口,代码如下
<>
if(top.location != self.location) { top.location=self.location; }
if(opener!=null){opener.location=self.location; }
setLink()
{
var obj = getElementById('Link_wit');
var src = getElementById('txbwit');
if(obj!=null&&src!=null)
{
if(src.!="")
obj.href = src.;
}
obj = getElementById('Link_fun');
src = getElementById('txbfun');
if(obj!=null && obj.==1)
{
if(src.!="")
obj.href = src.;
}
}
</>
if(top.location != self.location) { top.location=self.location; }
if(opener!=null){opener.location=self.location; }
setLink()
{
var obj = getElementById('Link_wit');
var src = getElementById('txbwit');
if(obj!=null&&src!=null)
{
if(src.!="")
obj.href = src.;
}
obj = getElementById('Link_fun');
src = getElementById('txbfun');
if(obj!=null && obj.==1)
{
if(src.!="")
obj.href = src.;
}
}
</>