Javascript force-pop-up window code-Cross-Interception

Source: Internet
Author: User

Study on forced pop-up window code-ForceWindow
This is an old code. This Code builds a Form and uses JS to submit the Form (you can also simulate the submit button to be clicked ). I tested it in IE8 but it was blocked in Firefox 3.5.
Copy codeThe Code is as follows:
ForceWindow. iclass. js code ):
/**
* ===================================================== ====================
* This program can be freely copied, modified, or disseminated, and the following information cannot be deleted. For commercial purposes, it shall be used with the consent of the original author.
* ===================================================== ==========
* Program name: ForceWindow (@ iClass. JS)
* Description: "break through" the ad interception software and force a window to pop up.
* Version: 1.0.0
* Created on: July 15, January 19, 2004
* Modification time: January 1, January 19, 2004
* File name: ForceWindow. iclass. js
* OPERATOR: Clock
* Email Address: zz@iecn.net zz315@163.com
* Copyright: This program belongs to iClass. JS and is copyrighted by the author.
* For details about the iClass program, see: http://www.iecn.net/forum/showthread.php? Threadid = 14811
* ===================================================== ============
*/
/**
* Defines the ForceWindow class Constructor
* No Parameter
* No Return Value
*/
Function ForceWindow ()
{
This. r = document.doc umentElement;
This. f = document. createElement ("FORM ");
This.f.tar get = "_ blank ";
This. f. method = "post ";
This. r. insertBefore (this. f, this. r. childNodes [0]);
}
/**
* Define the open Method
* Parameter sUrl: string, the URL of the window to be opened.
* No Return Value
*/
ForceWindow. prototype. open = function (sUrl)
{
This. f. action = sUrl;
This. f. submit ();
}
/**
* Instantiate a ForceWindow object and use it as a subobject of the window object for convenient calling.
* You can use window. force. open ("URL") as follows ");
*/
Window. force = new ForceWindow ();
/**
* The window popped up with this program will not be blocked by the ad blocking software, but there is a drawback: you cannot customize the appearance of the window. open pop-up window as you would.
* You can also instantiate a ForceWindow object before using it:
* Var myWindow = new ForceWindow ();
* Use this method:
* MyWindow. open ("URL ");
* Browsers tested in this program: IE 5 +, Firefox 1.0, Mozilla 1.7.5, Netscape 7.2, and Opera 7.23
* Friendly reminder: If you use this program to force the pop-up advertisement, please think more about the viewer's feelings!
*/

<Html> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <title> </title> </pead> <body onLoad =" window.force.pop('a.htm ') "> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Js forced pop-up window code research-another code

When JavaScript bounce IE is disabled, the advertisement code pops up to prevent blocking.

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.