Back to advertising, since it is called advertising, then how to let advertisers spend the money is really willing to spend it?
We can increase the judgment, if the pop-up window is blocked by the browser, so long as the user clicks on the page to trigger the window.open event, so generally will not intercept, the browser will think that this is the user's default behavior.
The code can be written as follows:
Copy Code code as follows:
var $E = YAHOO.util.Event;
var adpopup;
var popad = function (surl,sname,sfeatures,breplace) {
if (adpopup) return;
if (sname = = undefined) {
sname = ' _blank ';
};
if (sfeatures = = undefined) {
Sfeatures = ';
};
if (Breplace = = undefined) {
Breplace = false;
};
Adpopup = window.open (surl,starget,sfeatures,breplace);
Adpopup.blur ();
AdPopup.opener.focus ();
$E. RemoveListener (document.body, ' click ', Arguments.callee);
}
try {
Popad ();
catch (e) {
$E. On (document.body, ' click ', Popad);
}
Of course, if the user's browser has a blocking plugin installed, it will probably not pop up (such as Firefox's NoScript plugin, do not allow any pop-up window). The method is not absolute, is not the best, but with the least amount of time to do the most efficient things.
PS: Can be simulated form submitted by the way to pop-up window, traversing (relative to the General Interceptor window Plug-ins) is good, but can not set the Sfeatures parameter content