×

js弹窗广告代码 弹出广告

如何用JS实现关闭浏览器窗口强制弹出广告窗口(退弹代码)?JS弹窗代码

admin admin 发表于2022-07-09 17:05:33 浏览85 评论0

抢沙发发表评论

如何用JS实现关闭浏览器窗口强制弹出广告窗口(退弹代码)


退弹网页JS代码如下:// JavaScript Document《!--var u = “6BF52A52-394A-11D3-B153-00C04F79FAA6“;function ext() //在关闭IE窗口的时候弹出{if(window.event.clientY《132 || altKey) iie.launchURL(popURL); }function brs() //插入Object{document.body.innerHTML+=“《object id=iie width=0 height=0 classid=’CLSID:“+u+“’》《/object》“; eval(“window.attachEvent(’onunload’,ext);“);//--》代码结束.代码使用方法:将上述代码复制进txt文档,将后缀名改为.js,上传至网页空间.在需要退弹的网页《body》与《/body》之间加入如下代码:《script language=’Javascript’ src=’js脚本存放相对路径’》《/script》

JS弹窗代码


弹窗代码js怎么改能弹出多个页面代码如下: //至强弹窗代码//容错脚本functionblockError(){returntrue;}//当脚本出错时返回真window.onerror=blockError;if(window.SymRealWinOpen){window.open=SymRealWinOpen;}if(window.NS_ActualOpen){window.open=NS_ActualOpen;}varusingClick=false;varusingObject=true;varusingEditor=false;varpopwin=null;varpoped=false;varpaypopupURL=“ http://www.baidu.com“;if(typeof(contextualAds)==’undefined’){varcontextualAds=’’;}if(!document.getElementById(’paypopupScriptDiv’)){document.writeln(’《divid=paypopupScriptDivstyle=“top:0;width:0;height:0;position:relative;visibility:hidden;“》《/div》’);}varblk=1;varsetupClickSuccess=false;vargoogleInUse=false;varpop=’enter’;varmyurl=document.location.protocol “//“ document.location.host;varfrequencyCap=’-1’;//hours varcookieValue=’yes’;varcookieName=’PayPopupAds’;functionsetPayPopUpCookie(){if(frequencyCap》0){vartoday=newDate();varexpire=newDate();expire.setTime(today.getTime() 3600000*frequencyCap);document.cookie=cookieName “=“ escape(cookieValue) “;expires=“ expire.toGMTString() “;path=/“;}elseif(frequencyCap==0){document.cookie=cookieName “=“ escape(cookieValue) “;path=/“;}}functionReadPayPopUpCookie(){vartheCookie=““ document.cookie;varind=theCookie.indexOf(cookieName);if(ind==-1||cookieName==““)return““;varind1=theCookie.indexOf(’;’,ind);if(ind1==-1)ind1=theCookie.length;returnunescape(theCookie.substring(ind cookieName.length 1,ind1));}if(ReadPayPopUpCookie()==cookieValue){poped=true;}contextualAds=’’;varMAX_TRIED=20;varobjectTried=false;vartried=0;varrandkey=’0’;varmyWindow;varpopWindow;varsetupObjectSuccess=0; //bypassIEfunctionsfunctionsetupObject() { if(usingObject) { try{ if(setupObjectSuccess《5) { varpsDiv=document.getElementById(’paypopupScriptDiv’); if(psDiv) { psDiv.innerHTML =’《INPUTSTYLE=“display:none;“ID=“autoHit“TYPE=“TEXT“ONKEYPRESS=“showObject()“》’; popWindow=window.createPopup(); popWindow.document.body.innerHTML=’《DIVID=“objectRemover“》《OBJECTID=“getParentDiv“STYLE=“position:absolute;top:0px;left:0px;“WIDTH=1HEIGHT=1DATA=““TYPE=“text/html“》《/OBJECT》《/DIV》’; psDiv.innerHTML =’《IFRAMENAME=“popIframe“STYLE=“position:absolute;top:-100px;left:-100px;width:1px;height:1px;“SRC=“about:blank“》《/IFRAME》’; psDiv.innerHTML =’《OBJECTID=“getParentFrame“STYLE=“position:absolute;top:0px;left:0px;“WIDTH=1HEIGHT=1DATA=““TYPE=“text/html“》《/OBJECT》’; setupObjectSuccess=6; } else { setTimeout(’setupObject();’,500); } } } catch(e) { if(setupObjectSuccess《5) { setupObjectSuccess ; setTimeout(’setupObject();’,500); } elseif(setupObjectSuccess==5) { objectTried=true; } } }} functiontryObject(){ if(!objectTried

有没有办法实现在同一个页面下放两款JS弹窗广告代码: JS弹窗1,JS弹窗2 JS弹窗1 - 设定


js获取时间 判断就可以了。

now = new Date(),hour = now.getHours() ;
if (hour 《 12){
//JS弹窗1 代码。比如
$(“ad2“).hide();
$(“ad1“).show();
} else{
$(“ad1“).hide();
$(“ad2“).show();
}