用js实现“只弹出一次网页窗口”的源代码

80酷酷网    80kuku.com

  js|网页|源代码

<SCRIPT language=javascript>
function defaultwin(){
var exitwin,url,ownwin;
url = 'http://www.webjx.com';
exitwin = window.open(url,'nowexitwin');}
function get_cookie(Name) {
var search = Name + '='
var returnvalue = '';
if (documents.cookie.length > 0) {
offset = documents.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = documents.cookie.indexOf(';', offset);
if (end == -1)
end = documents.cookie.length;
returnvalue=unescape(documents.cookie.substring(offset, end))
}
}
return returnvalue;
}

function loadpopup(){
if (get_cookie('popped')==''){
defaultwin()
documents.cookie='popped=yes'
}
}
var webSiteID = 6;window.onload=loadpopup;
</SCRIPT>



分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: