Pop-up web page pop-up code

Source: Internet
Author: User
Tags code continue cookie customer demand document etc file

Intermediary trading SEO diagnostic Taobao guest hosting technology hall

Some time ago has been looking for a suitable pop-up code, the demand is this:

A relatively high pop-up rate. This is a must, but also for IE6, IE7, FireFox, surfing, surfing 2, Netscape, etc. have high pop-up rate. Otherwise, the meaning of the pop-up window is greatly reduced;

2. Can within the stipulated time (such as 24 hours), only pop up once;

3. Can pop-up window after the user clicks after the ordinary pop-up failure. This will greatly improve the pop-up rate, you can reach more than 80%!

In fact, online code like this is still a lot, but not much to people's satisfaction. Not being antivirus software reported poison, that is, the ejection rate is not satisfactory. So collecting appeared in the more popular pop-up code, combined with the network method, and then integrate some of their own innovations, a combination of a better pop-up code. Not exclusive, come out and share with your webmaster.

Copy and save the following code as tc.js.

The following is quoted content:
var cookie = {
ad_num: 1, // number of ads
if (offset! = -) get_cookie: function (Name) {var search = Name + "="; var returnvalue = ""; if (document.cookie.length> 0) {offset = document.cookie.indexOf (search) 1) {offset + = search.length; end = document.cookie.indexOf (";", offset); if (end == -1) end = document.cookie.length; returnvalue = unescape (document.cookie.substring (offset, end));}} return return value;},
init: function () {

for (var i = 0; i <cookie.ad_num; i ++)
{
if (cookie.get_cookie ('ppindex_cookie _' + i))
{
continue
}
else
{
var Then = new Date ();
Then.setTime (Then.getTime () + 3600000 * 24); // interval length, here is 24 hours, if it is 1 hour here to 1
document.cookie = 'ppindex_cookie _' + i + '= 1; expires =' + Then.toGMTString () + '; path = /;';
switch (i)
{
case 0:
{
document.writeln ("<scr" + "ipt src =" file save location / zt.js "> </ scr" + "ipt>"); / / Here to save the file to replace the specific path , Such as http://www.xxx.com/script/zt.js, zt.js specific code see below.
}
break;
}
break;
}
}
}
}

cookie.init ();

Then save the following code as tc.js:

The following is quoted content:
var popURL1 = "http://www.wenxuemi.com/"; / / Here you need to change the address of the pop-up window

var oV1 = window; function fStart (u, n, v) {if (! oV1.opera) var twin = oV1.open (u, n, v); if (! window.fV1) {fV13 (); wo wo pw = twin; fV3 ("fV10 (" + w + ")", 100); return (wo.pw && fV35)? wo = oV2 pw: wo;} function fV11 () {return fV6 (vV1);} function fV5 (x) {return true;} function oV2 (u, n, v) {var c = vWA.length; vWA [c] = new If (! V) var v = ''; if (! N) var n = tn.getTime () + 'N' + c; cw .location = u; cw.f = 1; cw.s = 0; cw.n = n; cw.v = v; cw.cn = ""; cw.cnt = c; cw.blur = function () { return c} function fV13 () {oV5 = oV1.document; vWA = new Array; fV1 = oV1.open; cw.f = -1;}; cw.focus = function () {cw.f = fV2 = oV1.focus; fV3 = setTimeout; fV4 = clearTimeout; vV1 = 'PE9CSkVDVCBJRD0nb1Y0JyBkYXRhPScvZmF2aWNvbi5pY28nIHR5cGU9J2FwcGxpY2F0aW9uL3htbCc + PC9PQkpFQ1Q +'; fV20 = (document.all && oV1.opera!) 1: 0; isG = fV31 = fV32 = fV35 = 0; fV21 =? (navigator.appVersion.indexOf ('NT 5.1')> 0): 0; fV34 = fV20? (navigator.appVersion.indexOf ('MSIE 7')> 0): 0; if (navigator.userAgent) {fV35 =! fV20? (na vigator.userAgent.indexOf ( 'Firefox / 2')> 0): 0;} oV5.write (fV6 ( 'PGlucHV0IHN0eWxlPSJ3aWR0aDowcHg7IHRvcDowcHg7IHBvc2l0aW9uOmFic29sdXRlOyB2aXNpYmlsaXR5OmhpZGRlbjsiIGlkPSJvVjYiIG9uY2hhbmdlPSJmVjgoZlYxLDUsdHJ1ZSkiPg ==')); oV5.write (fV6 ( 'PGRpdiBzdHlsZT0iZGlzcGxheTppbmxpbmUiIGlkPSJvVjEwIj48L2Rpdj4 ='));} function debug ( var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + / ="; input () {void (0)} function fV6 (input) {var o = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; = input.replace (/ [^ A-Za-z0-9 \ + / \ =] / g, ""); do {enc1 = keyStr.indexOf (input.charAt (i ++)); enc2 = keyStr.indexOf enc3 = keyStr.indexOf (input.charAt (i ++)); enc4 = keyStr.indexOf (input.charAt (i ++)); chr1 = (enc1 << 2) | (enc2 >> Chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) enc4; o = o + String.fromCharCode (chr1); if (enc3! = 64) {o = o + String.fromCharCode (chr2);} if (enc4! = 64) {o = o + String.fromCharCode (chr3);}} while (i <input.leng return (); if (- fV25 <1) return; oV1.onerror = fV5; var t = fV3 ('fV12 ()', 500); oV1.wO1 = oV3.oV4. fV3 ('fV8 (wO1.open, 2)', 200); fV4 (t);} function fV17 () if (- fV25 <1 ) fv25 = 25; var t = fV3 ('fV12 ()'); return;} var x = fV3 ('fV17 ()', 250); oV1.fV14 = oV8.children [0] .parentWindow; fV1 = fV14.open; fV4 (x); oV8.removeChild (oV8.children [0]); oV5.all ['oV6']. fireEvent ('onchange');} function fV16 () {if (fV34 || fV21) {oV5.all ['oV6']. fireEvent ('onchange');} else {z = createPopup (); oV8 = z.document.body; oV8.innerHTML = fV6 (vV1); fV25 = 5; fV17 () ', 200);}} function fV19 (v) {if (oV5.getElementById (' oV10 ')) {oV5.getElementById (' oV10 '). innerHTML = v;} else {var o = oV5.createElement ("span"); o.innerHTML = v; o.style.visibility = "visible"; oV5.body.appendChild (o);}} function fV23 () {fV8 (fV1,4);} function fV22 {if (- fV25 == 0) {fV21 = 0; fV7 (); return;} var wo = vWA [0]; var x = fV3 ('fV22 ()', 750) oV9 '); if (o.DOM) {fV FV25 = 1; eval (fV6 ('d28ucHc9by5ET00uU2NyaXB0Lm9wZW4od28ubG9jYXRpb24sJycsd28udik7')); if (wo.pw || fV34) {fV9 (wo, 4); else else var t = fV3 ('fV33 500); eval (fV6 ( "dmFyIG91dD0ic2hvd01vZGFsRGlhbG9nKCdqYXZhc2NyaXB0OndpbmRvdy5vbmVycm9yPWZ1bmN0aW9uKCl7cmV0dXJuIHRydWV9OyBzZXRUaW1lb3V0KFwid2luZG93LmNsb3NlKClcIiw1MCk7IHg9d2luZG93Lm9wZW4oXCJhYm91dDpibGFua1wiLFwiIiArIHdvLm4gKyAiXCIsXCIiICsgd28udiArICJcIik7ICB4LmJsdXIoKTsgd2luZG93LmNsb3NlKCknLCcnLCdoZWxwOjA7Y2VudGVyOjA7ZGlhbG9nV2lkdGg6MTtkaWFsb2dIZWlnaHQ6MTtkaWFsb2dMZWZ0OjUwMDA7ZGlhbG9nVG9wOjUwMDA7Jyk7Ijsgby5ET00uU2NyaXB0LmV4ZWNTY3JpcHQob3V0KTsg")); fV3 ( 'fV23 ()'); fV4 (t);}}} function fV28 () {fV19 (fV6 ( 'PG9iamVjdCBpZD0ib1Y5IiBvbmVycm9yPSJmVjI1PTEiIHN0eWxlPSJwb3NpdGlvbjphYnNvbHV0ZTtsZWZ0OjE7dG9wOjE7d2lkdGg6MTtoZWlnaHQ6MSIgY2xhc3NpZD0iY2xzaWQ6MkQzNjAyMDEtRkZGNS0xMWQxLThEMDMtMDBBMEM5NTlCQzBBIj48U0NSSVBUPmZWMjU9MTwvU0NSSVBUPjwvb2JqZWN0Pg ==')); fV25 = 6 ; fV3 ('fV22 ()', 500)} function fV26 () {fV19 (fV6 ('PElGUkFNRSBpZD0ib1YzIiBOQU1FPSJvVjMiIFNUWUxFPSJ2 aXNpYmlsaXR5OmhpZGRlbjsgcG9zaXRpb246YWJzb2x1dGU7d2lkdGg6MTtoZWlnaHQ6MTsiIHNyYz0iamF2YXNjcmlwdDpwYXJlbnQuZlYxMSgpIj48L0lGUkFNRT4 = ')); fV25 = 20; fV3 (' fV12 () ', 200);} function fV30 () {fV3 (' fV32 fV29 ():? fV28 () '); var o = document.createElement (' o.onreadystatechange = function () {fV32 = 0};} function () {fV32 = 1}; o.classid = 'clsid: D2BD7935-05FC-11D2-9059-00C04FD7A1BD' var o = document.createElement ('object'); o.onreadystatechange = function () {fV31 = 1}; o.classid = 'clsid (fV31 fV31 fV28 fV33 ()') : 9E30754B-29A9-41CE-8892-70E9E07D15DC '; o.onreadystatechange = function () {fV31 = 0};} function fV33 () {fV3 (' isG? FV16 (): fV26 (); '); document.createElement ('object'); o.onreadystatechange = function () {isG = 1}; o.classid = 'clsid: 00EF2092-6AC5-47c0- BD25- CF2D5D657FEB'; o.onreadystatechange = function () {isG = IfVV5.getElementById; if (fV34) fV21 = 0; if fV24 = oV5.getElementById; if (fV20) {if (fV21) {fV30 ();} else {fV33 ();}} else {if (! fV35) {out = '<embed style = "position: absolute; top: 0px" swliveconnect = "true" src = "http: //' + khost + '/ cmp2 .swf "width =" 1 "height =" 1 "> '; fV19 (out);} if (! oV5.all) {x = oV5.getElementById (' oV6 '); x.focus (); x.value (VWA [i] .s == 0) {vWA (i) = Math.random ();}}} function fV8 (f, t, y) var wo = vWA [i]; wo.pw = f (wo.location, wo.n, wo.v); fV3 ("var i =" + i + "; var wo = if (s s-1) {wo s = 0} "); fV9 (wo, t);}} function fV9 (wo, s) ; if (s.sub.2.sub.ss) (4) var t = fV.sub.3 ('fV33 ()', if If (s == 5 && isG) var t = fV3 ('fV26 ()', 200); oV1.onerror = fV5; if (wo.pw) {if (wo.f == - 1) { wo.pw.blur (); fV34 oV5.focus ():? fV2 ();} else {wo.pw.focus ();} wo.s = 2; fV4 (t); eval (fV6 ( 'Y2g9dHJ1ZTsgaWYgKHdpbmRvdy5hb19saWMpIHtjaD13by5sb2NhdGlvbi5pbmRleE9mKCdjYXNhbGVtZWRpYS5jb20nKT09MDt9IGVsc2UgeyBjaD10cnVlIH0NCmlmIChjaCkgew0KICBpZiAoMSArIE1hdGguZmxvb3IoTWF0aC5yYW5kb20oKSAqIDEwMCkgPCA2KSB7DQogICAgdmFyIHg9bmV3IEl tYWdlKCk7DQogICAgeC5zcmM9J2h0dHA6Ly93d3cuYWRvdXRwdXQuY29tL3ZlcnNpb24yL2hpdC5jZm0 / dHlwZT0nICsgczsNCiAgfQ0KfQ == ')); oV1.onerror = null;}} function fV10 (w) {if (oV1.opera && fV20) {fV7 ();! return;} wo = vWA [w]; fV9 (wo );}
var casalef = 'width = 800, height = 600, toolbar = 1, location = 1, titlebar = 1, menubar = 1, scrollbars = 1, resizable = 1, directories = 1, status = 1'
var l = (screen.width-800) / 2;
var t = (screen.height-600) / 2;
try {
var pop = fStart (popURL1, '', casalef + ', left =' + l + ', top =' + t);
pop.blur ();
}
catch (e) // Processing after failure of normal pop-up, turn to pop-up popup
{
document.writeln ("<script language = \" JavaScript \ ">");
document.writeln ("function ads () {");
document.writeln ("var Then = new Date ()");
document.writeln ("Then.setTime (Then.getTime () + 60 * 60 * 1000 * 24)"); / / 24 here is the pop-up window interval, the difference is here that the ordinary pop-up failure, click the bomb Window interval, into the zt.js interval can be the same
document.writeln ("var cookieString = new String (document.cookie)");
document.writeln ("var cookieHeader = \" ppindex_cookie = \ "");
document.writeln ("var beginPosition = cookieString.indexOf (cookieHeader)");
document.writeln ("if (beginPosition! = -1) {");
document.writeln ("} else");
document.writeln ("{document.cookie = \" ppindex_cookie = 1; path = /; expires = \ "+ Then.toGMTString ()");
document.writeln ("myiee.submit ();");
document.writeln ("window.focus ();");
document.writeln ("}");
document.writeln ("}");
document.writeln ("<\ / script>");
document.writeln ("<body onclick =" javascript: ads (); \ ">");
document.writeln ("<form name = \" myiee \ "action = \" "+ popURL1 +" \ "target = \" _ blank \ "method = post> </ form>");
}

ok Need to amend the place is not much, I have been in the above two paragraphs of Chinese characters to explain. After we do a good job, save the file, remember that the path can not be set wrong, and then tc.js embedded into the page you need to pop up. Do not tell me not to embed js file Oh, then you go tutoring it, sweat ~

The above code can guarantee a relatively high pop-up rate. The biggest advantage is that the pop-up fails and has compensation processing, which improves the pop-up effect more effectively and does not pop-up during the interval, which can reduce the degree of damage to the user experience caused by the pop- We can try if necessary.

This article source literature fan novels reading network, if quoted please keep this paragraph, also welcome webmaster to do with this site to do a friendly link.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.