一个IP只弹出一次窗口的代码
<SCRIPT language=JavaScript>
function defaultwin(){
var exitwin,url,ownwin;
url = 'http://www.antso.com'; //要弹出的网站地址,自己修改
exitwin = window.open(url,'nowexitwin');}
function get_cookie(Name) {
var search = Name + '='
var returnvalue = '';
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(';', offset);
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadpopup(){
if (get_cookie('popped')==''){
defaultwin()
document.cookie='popped=yes'
}
}
window.onload=loadpopup;
</SCRIPT>
© 2001-2030 m.dreamart.cn
QQ:3815864 das@dreamart.cn