---------------------------
ad.js-的
代码如下:---------------------------------
function setcookie(name, value, expire) {
window.document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.togmtstring()));
}
function getcookie(name) {
var search = name + "=";
if (window.document.cookie.length > 0) { / if there are any cookies
offset = window.document.cookie.indexof(search);
if (offset != -1) { / if cookie exists
offset += search.length; / set index of beginning of value
end = window.document.cookie.indexof(";", offset) / set index of end of cookie value
if (end == -1)
end = window.document.cookie.length;
return unescape(window.document.cookie.substring(offset, end));
}
}
return null;
}
function register(name) {
var today = new date();
var expires = new date();
expires.settime(today.gettime() + 1000*60*60*24);
setcookie("itdoor", name, expires);
}
var exiturl=http://homepage.yesky.com/;
function openwin() {
var c = getcookie("itdoor");
if (c != null) {
return;
}
register("xiaolin");
var featurestr="''";
featurestr="'top=0,left=0,width=800,height=600,toolbar=yes, menubar=no, scrollbars=no, resizable=no, location=no, status=no,center:no'";
self.focus();
var exitwindow = window.open(exiturl,'', featurestr);
exitwindow.focus();
}
openwin();
window.focus() ========================完成任务==============
在需要弹出的网页中调用上面的
代码:
<scr
ipt src="http://www.webjx.com/
ad.js"></scr
ipt>