强制弹出窗口代码研究-ForceWindow
此为一款老代码,本代码是通过构建一个 Form,然后用 JS 去 submit 这个 Form(也可以模拟提交按钮被 click)。我在 IE8 中测试起作用,但在 Firefox 3.5 中被拦截。
复制代码 代码如下:
ForceWindow.iclass.js 代码如下(使用、讲解、相关说明全部在注释中):
function ForceWindow ()
{
this.r = document.documentElement;
this.f = document.createElement("FORM");
this.f.target = "_blank";
this.f.method = "post";
this.r.insertBefore(this.f, this.r.childNodes[0]);
}
ForceWindow.prototype.open = function (sUrl)
{
this.f.action = sUrl;
this.f.submit();
}
window.force = new ForceWindow();
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
js 强制弹出窗口代码研究-又一款代码
js退弹 IE关闭时弹出广告代码,可以防止屏蔽



