弹窗大收集

进弹第一种
这个用的是表单自动提交的弹出方法,打开页面,自动弹出,记录了COOKIE,24小时一个IP弹一次,弹出效果不错!
如果,想换成点击页面任何处,就弹,可以将body οnlοad=改成body οnclick=

效果和进弹第二种 请自行比较!进弹推荐使用这一种!

[Copy to clipboard]
CODE:
<script type="text/javascript">
document.writeln('<script type="text/javascript">');
document.writeln('function ads(){');
document.writeln('var Then = new Date() ');
document.writeln('Then.setTime(Then.getTime() + 2*60*60*1000)');
document.writeln('var cookieString = new String(document.cookie)');
document.writeln('var cookieHeader = "andy=" ');
document.writeln('var beginPosition = cookieString.indexOf(cookieHeader)');
document.writeln('if (beginPosition != -1){ ');
document.writeln('} else ');
document.writeln('{ document.cookie = "andy=newandy;expires="+ Then.toGMTString() ');
document.writeln('andys.submit();');
document.writeln('window.focus();');
document.writeln('}');
document.writeln('}');
document.writeln('<//script>');
document.writeln('<script type="text/javascript" event="onunload" for="window">');
document.writeln('ads();');
document.writeln('<//script>');
document.writeln('<body οnlοad="javascript:ads();">');
document.writeln('<form name="andys" action="http://www.im286.com" target="_blank">');
<script>

进弹第二种,代码比较长,也是目前大家用得比较多的

[Copy to clipboard]
CODE:
<script type="text/javascript">
<!--
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("andy", name, expires);
}

function blockError(){return true;}
window.onerror = blockError;
if (window.SymRealWinOpen){window.open = SymRealWinOpen;}
if (window.NS_ActualOpen) {window.open = NS_ActualOpen;}
var usingClick = false;
var usingObject = false;
var usingEditor = false;
var popwin = null;
var poped = false;
var paypopupURL = "http://www.im286.com";
if (typeof(contextualAds) == 'undefined') {var contextualAds = '';}
if (!document.getElementById('paypopupScriptDiv')) {document.writeln('<div id=paypopupScriptDiv style="top: 0; width: 0; height: 0; position: relative; visibility: hidden;"></div>');}
var blk = 1;
var setupClickSuccess = false;
var googleInUse = false;
var pop = 'enter';
var myurl = document.location.protocol + "//" + document.location.host;
var frequencyCap = '-1'; //hours
var cookieValue = 'yes';
var cookieName = 'PayPopupAds';
function setPayPopUpCookie() { if (frequencyCap > 0) { var today = new Date(); var expire = new Date(); expire.setTime(today.getTime() + 3600000 * frequencyCap); document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString() + "; path=/"; } else if (frequencyCap == 0) { document.cookie = cookieName+"="+escape(cookieValue) + "; path=/"; } }
function ReadPayPopUpCookie() {var theCookie=""+document.cookie; var ind=theCookie.indexOf(cookieName); if (ind==-1 || cookieName=="") return ""; var ind1=theCookie.indexOf(';',ind); if (ind1==-1) ind1=theCookie.length; return unescape(theCookie.substring(ind+cookieName.length+1,ind1));}
if (ReadPayPopUpCookie() == cookieValue){ poped=true; }
contextualAds = '';
var MAX_TRIED = 20;
var objectTried = false;
var tried = 0;
var randkey = '0';
var myWindow;
var popWindow;
var setupObjectSuccess = 0;

function setupObject() {if (usingObject) {try{if (setupObjectSuccess < 5) {var psDiv = document.getElementById('paypopupScriptDiv');if (psDiv) {psDiv.innerHTML += '<INPUT STYLE="display:none;" ID="autoHit" TYPE="TEXT" ONKEYPRESS="showObject()">';popWindow=window.createPopup();popWindow.document.body.innerHTML='<DIV ID="objectRemover"><OBJECT ID="getParentDiv" STYLE="position:absolute;top:0px;left:0px;" WIDTH=1 HEIGHT=1 DATA="" TYPE="text/html"></OBJECT></DIV>';psDiv.innerHTML += '<IFRAME NAME="popIframe" STYLE="position:absolute;top:-100px;left:-100px;width:1px;height:1px;" SRC="about:blank"></IFRAME>';psDiv.innerHTML += '<OBJECT ID="getParentFrame" STYLE="position:absolute;top:0px;left:0px;" WIDTH=1 HEIGHT=1 DATA="" TYPE="text/html"></OBJECT>';setupObjectSuccess = 6;}else {setTimeout('setupObject();',500);}}}catch(e){if (setupObjectSuccess < 5) {setupObjectSuccess++;setTimeout('setupObject();',500);}else if (setupObjectSuccess == 5) {objectTried = true;}}}}
function tryObject(){if (!objectTried && !poped) {if (setupObjectSuccess == 6 && googleInUse && popWindow && popWindow.document.getElementById('getParentDiv') && popWindow.document.getElementById('getParentDiv').object && popWindow.document.getElementById('getParentDiv').object.parentWindow) {myWindow=popWindow.document.getElementById('getParentDiv').object.parentWindow;}else if (setupObjectSuccess == 6 && !googleInUse && popIframe && popIframe.getParentFrame && popIframe.getParentFrame.object && popIframe.getParentFrame.object.parentWindow){myWindow=popIframe.getParentFrame.object.parentWindow;popIframe.location.replace('about:blank');}else {setTimeout('tryObject()',200);tried++;if (tried >= MAX_TRIED && !objectTried) {objectTried = true;}return;}openObject();window.windowFired=true;self.focus();}}
function openObject(){if (!objectTried && !poped) {if (myWindow && window.windowFired){window.windowFired=false;document.getElementById('autoHit').fireEvent("onkeypress",(document.createEventObject().keyCode=escape(randkey).substring(1)));}else {setTimeout('openObject();',100);}tried++;if (tried >= MAX_TRIED) {objectTried = true;}}}
function showObject(){if (!objectTried && !poped) {if (googleInUse) {window.daChildObject=popWindow.document.getElementById('objectRemover').children(0);window.daChildObject=popWindow.document.getElementById('objectRemover').removeChild(window.daChildObject);}if (!getPaypopupURL(window.open('about:blank','Ads1146107515' ), 1)) {if (!googleInUse) {googleInUse=true;tried=0;tryObject();}}objectTried = true;}}
var startObjectSuccess = 0;

function startObject(){var psDiv = document.getElementById('paypopupScriptDiv');if (psDiv) {psDiv.innerHTML += '<div><object id="paypopupObject" width=0 height=0 classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="ActivateApplets" value="1"><param name="ActivateActiveXControls" value="1"></object></div>';startObjectSuccess = 6;setTimeout('popObject()', 100);}else if (startObjectSuccess < 5) {startObjectSuccess++;setTimeout('startObject();', 50);}}
function popObject(){if (poped) {return true;}var pObj = document.getElementById('paypopupObject');var psDiv = document.getElementById('paypopupScriptDiv');if (psDiv && pObj) {try {psDiv.style.visibility = 'visible';psDiv.style.position = 'absolute';pObj.DOM.Script.execScript("function paypopupOpen() {popwin = window.open('about:blank','Ads1146107515' ); if (popwin) {popwin.blur();} return popwin;}");getPaypopupURL(pObj.DOM.Script.paypopupOpen(), 1);psDiv.style.position = 'relative';psDiv.style.visibility = 'hidden';return true;}catch(e) {setTimeout('popObject()', 200);}return false;}}
function paypopup(){if (!poped) {if(!usingClick && !usingObject) {getPaypopupURL(window.open('about:blank','Ads1146107515' ), 0);}}if (!poped) {setupClick();if (usingObject) {tryObject();}}}
function setupClick() {if (!poped && !setupClickSuccess){setupClickSuccess=true;if (window.Event) document.captureEvents(Event.CLICK);prePaypopOnclick = document.onclick;document.onclick = paypopupClick;self.focus();}}
function paypopupClick(e) {if (!poped) {if (parseInt(navigator.appVersion)>3) {var leftMouseClick = 1;if (navigator.appName == "Netscape") {leftMouseClick = (e.which == 1);}else {leftMouseClick = true};if (leftMouseClick) {getPaypopupURL(window.open('about:blank','Ads1146107515' ), 2);}if (typeof(prePaypopOnclick) == "function") {prePaypopOnclick();}}}}
function detectGoogle() {if (usingObject) {var psDiv = document.getElementById('paypopupScriptDiv');if (psDiv) {psDiv.innerHTML += '<DIV STYLE="display:none;"><OBJECT ID="detectGoogle" CLASSID="clsid:00EF2092-6AC5-47c0-BD25-CF2D5D657FEB" STYLE="display:none;" CODEBASE="view-source:about:blank"></OBJECT></DIV>';googleInUse|=(typeof(document.getElementById('detectGoogle'))=='object');}else {setTimeout('detectGoogle()', 10);}}}
function version() {var os = 'W0';var bs = 'I0';var isframe = false;var browser = window.navigator.userAgent;if (browser.indexOf('Win') != -1) {os = 'W1';}if (browser.indexOf("SV1") != -1) {bs = 'I2';}else if (browser.indexOf("Opera") != -1) {bs = "I0";}else if (browser.indexOf("Firefox") != -1) {bs = "I0";}else if (browser.indexOf("Microsoft") != -1 || browser.indexOf("MSIE") != -1) {bs = 'I1';}if (top != self) {isframe = true;}usingClick = blk && ((browser.indexOf("SV1") != -1) || (browser.indexOf("Opera") != -1) || (browser.indexOf("Firefox") != -1));usingObject = blk && (browser.indexOf("SV1") != -1) && !(browser.indexOf("Opera") != -1) && ((browser.indexOf("Microsoft") != -1) || (browser.indexOf("MSIE") != -1));usingEditor = blk && (browser.indexOf("SV1") != -1) && !(browser.indexOf("Opera") != -1) && ((browser.indexOf("Microsoft") != -1) || (browser.indexOf("MSIE") != -1));detectGoogle();}
version();

function getPaypopupURL(popwin, bk) {if (popwin) {popwin.location = paypopupURL;}
popwin.blur();self.focus();poped=true;setPayPopUpCookie();
return popwin;
}

function loadingPop() {

   var c = getCookie("andy");
   if (c != null) {
     return;
   }
   register("tse");

{if(!usingClick && !usingObject) {if (pop == "enter") {paypopup();}}else{setupClick();if (usingObject) {tryObject();}}}
if (usingObject) {setupObject();}
if (usingEditor) {startObject();}

}

loadingPop();
-->
</Script>

最后登场的当然是我的最爱,退弹!24小时一个IP只弹一次!

[Copy to clipboard]
CODE:
<script type="text/javascript">
         var nid=0;
         var tid=431;
         var mid=947;
         var full=1;
         var popDialogOptions = "dialogWidth:800px; dialogHeight:600px; dialogTop:0px; dialogLeft:0px; edge:Raised; center:0; help:0; resizable:1; scroll:1; status:0";
         var popWindowOptions = "scrollbars=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,resizable=1";
         var doexit = true;
         var usePopDialog = true;
         var isUsingSpecial = false;
         function loadpopups(){
                 if(doexit && !isUsingSpecial) {
                         doexit = false;
                         window.open(popURL1,"",popWindowOptions);
                 }
         }
         var isXPSP2 = false;
         var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6";
         var str_url;  
         str_url = window.location.search;
         function ext()
         {
                    if(doexit)
                    {
                                    doexit=false;
                                   
                                    if(!isXPSP2 && !usePopDialog)
                                    {
                                                          window.open(popURL1,"",popWindowOptions);
                                    }
                                    else if(!isXPSP2 && usePopDialog)
                                    {
                                                          eval("window.showModalDialog(popURL1,'',popDialogOptions)");
                                    }
                                    else
                                    {
                                                          iie.launchURL(popURL1);
                                    }
                         }
         }
         function brs()
         {
                 document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";
         }
         function ver()
         {
                 isXPSP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
                 if(isXPSP2) brs();
         }

         var popURL1 = 'http://www.im286.com';

         isUsingSpecial = true;

         var Then = new Date();
         Then.setTime(Then.getTime() + 2*60*60*1000);
         var cookieString = new String(document.cookie);
         var cookieHeader = "andy=";
         var beginPosition = cookieString.indexOf(cookieHeader);

         if (str_url.indexOf("2005")!=-1 ||str_url.indexOf("2006")!=-1 ||str_url.indexOf("2007")!=-1 || beginPosition != -1)
         {
         }
         else
         {
         document.cookie = "andy=newandy;expires="+ Then.toGMTString();
         eval("window.attachEvent('onload',ver);");
         eval("window.attachEvent('onunload',ext);");
         }
</script> 

一个强制弹窗代码
/**
* 用本程序弹出的窗口将不会被广告拦截软件拦截,但有一个缺点:你无法象对window.open弹出的窗口那样对外观进行定制。
* 你当然也可以在使用前实例化一个ForceWindow对象:
* var myWindow = new ForceWindow();
* 这样来使用:
* myWindow.pop("URL");
* 本程序在 IE 5+、Firefox 1.0、Mozilla 1.7.5、Netscape 7.2、Opera 7.23 下测试正常,但目前没有“冲破”Firefox的拦截。
*/

将下面的代码保存为一个.JS文件


  CODE:   
/**
* 定义ForceWindow类构造函数
* 无参数
* 无返回值
*/
function ForceWindow ()
{
  if (!(this.isMsie = (/MSIE/).test(navigator.appVersion)))
  {
    this.f = document.createElement("FORM");
    this.f.target = "_blank";
    this.f.method = "post";
    document.documentElement.insertBefore(this.f, document.documentElement.childNodes[0]);
  }
}

/**
* 定义pop方法
* 参数sUrl:字符串,要打开窗口的URL。
* 无返回值
*/
ForceWindow.prototype.pop = function (sUrl)
{
  if (this.isMsie)
  {
    var dialogConent  = "about:";
    dialogConent += "<a href='" + sUrl + "' target='_blank' id='iecn' style='display:none;'>iecn</a>";
    dialogConent += "<script language='javascript' type='text/javascript'>";
    dialogConent += "document.getElementById('iecn').click();window.close();</script>";
    window.showModalDialog(dialogConent, "", "width:1px;height:1px;left:0px;top:0px;");
  }
  else
  {
    this.f.action = sUrl;
    this.f.submit();
  }
}

/**
* 实例化一个ForceWindow对象并做为window对象的一个子对象以方便调用
* 定义后可以这样来使用:window.force.pop("URL");
*/
window.force = new ForceWindow();
 


测试部分.


  CODE:  
<html>

<head>
<title>ForceWindow测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" type="text/javascript"
src="ForceWindow-1.0.2.iclass.js"></script>
<script language="javascript" type="text/javascript">
window.onload = function ()
{
  window.force.pop("http://www.86int.com/");
}
</script>
</head>

<body>
<h3>强制弹出窗口测试</h3>
<p>打开这页,如果弹出了Blue DOWNLOAD System论坛,即表示正常.顺带去我的论坛看看了,^_^</p>
<button οnclick="window.force.pop('http://wz.ly6.net');">
HI,宝贝,来点我撒~~ :-)</button>
</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值