Break through IE screen restrictions, their own site to play a new IE window

Source: Internet
Author: User
Tags functions return split window

Writing this article is not to tell the spam advertisers can pop-up ads or hide behind the pop-up window, but to remind you that the IE kernel also has some winter and winter can bypass the majority of IE-core browser advertising screen function, or even around the browser itself, directly pop-up a real internet Explorer window. Not all of course, some still do better, such as Maxthon, although the new window opened, but still exist in the Maxthon, and will not pop a pop-up ie in the background, but the TT, the world and other browsers will not be able to directly open for the new IE window. Since ancient times are thing falls, hope to have the corresponding solution.

The principle is simple. Most browsers ' pop-up ad shielding functions perform a mask window.open this function. Of course, there are a few tools and software that can mask the ShowModalDialog and Showmodalessdialog functions, and the ShowModal class function can open a modal window as long as it works. IE is fully encapsulated in this function, so running window.open () in the ShowModal class function is not shielded.

So knowing this principle can be used to write several javascript on your own.
1. Open a specified page with ShowModalDialog
2. The specified page does not need content, only to execute a window.open () can be opened to open your window
3. Open this window and close it in the modal window (Window.close ())
This allows you to open the window indirectly by using modal windows.

Related code:
Home Page Code:

<script language=javascript>
Open modal window
function ShowDialog (dialogurl) {
var surl = Dialogurl;
var sfeathers = "Help:off;resizable:off;scroll:no;status:off";
sURL = sURL
window.showModalDialog (sURL, "", sfeathers);
}
Open the specified URL
function OpenURL (sURL) {
modal window file address
var dialogurl = "txdialog.htm";
Plus random parameter, force refresh, here can not
Dialogurl + = "r=" + math.random () *100000;
Dialogurl + = "&url=" + surl;
ShowDialog (Dialogurl);
}
</script>
Test code
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >

<title>Untitled</title>

<body> Please enter the URL to open the window:
<input type= "text" name= "Txturl" id= "Txturl" value= "http://senyx.cnblogs.com" >
<input type=button value= ' Test ' >
</body>
In the modal window's page (txdialog.htm), place the following code:
<script language=javascript>
function Request (strName)
{
var strhref = location.href;
var intpos = Strhref.indexof ("?");
var strright = strhref.substr (intpos + 1);
var arrtmp = Strright.split ("&");
for (var i = 0; i < arrtmp.length; i++)
{
var arrtemp = arrtmp[i].split ("=");
if (arrtemp[0].touppercase () = = Strname.touppercase ()) return arrtemp[1];
}
Return "";
}
var surl = Request ("url");
alert (sURL);
window.open (sURL);
Window.close ();
</script>
Example Downloads:
Http://www.cnblogs.com/Files/senyx/iepoper.rar
Access txtest.htm to open the Txdialog.htm dialog box

Http://fanrsh.cnblogs.com/articles/280189.html



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.