强制弹出页面代码,不被任何工具拦截的那种`~有兴趣的都进来研究研究!
weilf 2004-10-22 11:12:19 以下是我截取的一段代码,但我不会分析,请高手来分析一下,这种强制弹出的原理是什么,而且不被任何工具拦截,并且每天只弹一次,现在很多广告联盟都用这个弹出方式,淘宝啊什么的都是!!
大家研究一下!
<script language="javascript">
document.write("");
function GetCookie_265 (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen){
var j = i + alen;
if (document.cookie.substring(i, j) == arg) return getCookieVal_265 (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie_265 (name, value){
var argv = SetCookie_265.arguments;
var argc = SetCookie_265.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
}
function DeleteCookie_265 (name){
var exp = new Date();
exp.setTime (exp.getTime() - 1);// This cookie is history
var cval = 0;
document.cookie = name + "=" + cval + ";
expires=" + exp.toGMTString();
} //这里有段注释,我没能抓下来
var expDays_265 = 1;
var exp_265 = new Date();
exp_265.setTime(exp_265.getTime() + (expDays_265*24*60*60*1000));
var expDays = 1;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function getCookieVal_265(offset){
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1) endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
DeleteCookie_265("is_use_cookie");
SetCookie_265("is_use_cookie", "yes", exp_265);
if(GetCookie_265('is_use_cookie') == null){
window.showModelessDialog('http://union.265.com/online.php?pid=6561&aid=&u=http%3A%2F%2Fwww.suite-dress.com&r=http%3A%2F%2Fwww.bt173.com%2Fad.htm&c=39211098408651&m=dc917c6253a06f184e62fbd6f5633d22&a=0&is_c=&ip=218.72.10.61&is_use_c=9962ad1c527ad56192beff48761268da','','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px');
}
else{
if(GetCookie_265('adunion6561') == null){
SetCookie_265('adunion6561', 'yes', exp, '', 'bt173.com');
window.showModelessDialog('http://union.265.com/online.php?pid=6561&aid=&u=http%3A%2F%2Fwww.suite-dress.com&r=http%3A%2F%2Fwww.bt173.com%2Fad.htm&c=39211098408651&m=dc917c6253a06f184e62fbd6f5633d22&a=0&is_c=&ip=218.72.10.61&is_use_c=64edb23d9e3d6887c216b8c5b162b66b','','scroll:0;status:0;help:0;resizable:0;dialogWidth:0px;dialogHeight:0px');
}
}
</script>