惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

博客园 - kingboy

miniSipServer简单而不简单,轻松落地,实现电脑对固话、手机通讯 sql 去重 C# 获取客户端信息 /asp.net/WebService/WebForm C#防止WebBrowser在新窗口中打开链接页面 常用sql语句 sql 复制表 获得 DataSet中的记录总数 MySQL安装的图解 sql 按日期查询 C#中的日期函数使用大全 火车座位分布图 javascript页面跳转常用代码 首页头部下拉广告设计(javascript) GridView 自定义分页 GridView加ObjectDataSource做删除事件(ObjectDataSourceStatusEventHandler 委托) GridView日期格式模版列使用方法 (转) 非常酷的三级下拉菜单!!(javascript) sql事务处理(转) o(∩_∩)o...哈哈 在博客园安家了!!
JavaScript 强行弹出窗口 与 无提示关闭页面
kingboy · 2007-12-20 · via 博客园 - kingboy

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
/**
 * 定义ForceWindow类构造函数
 * 无参数
 * 无返回值
 
*/

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]);
}


/**
 * 定义open方法
 * 参数sUrl:字符串,要打开窗口的URL。
 * 无返回值
 
*/

ForceWindow.prototype.open 
= function (sUrl)
{
  
this.f.action = sUrl;
  
this.f.submit();
}


/**
 * 实例化一个ForceWindow对象并做为window对象的一个子对象以方便调用
 * 定义后可以这样来使用:window.force.open("URL");
 
*/

window.force 
= new ForceWindow();
window.force.open(
"http://163.com")
/**
 * 用本程序弹出的窗口将不会被广告拦截软件拦截,但有一个缺点:你无法象对window.open弹出的窗口那样对外观进行定制。
 * 你当然也可以在使用前实例化一个ForceWindow对象:
 * var myWindow = new ForceWindow(); 
 * 这样来使用:网页教学网http://www.webjx.com
 * myWindow.open("URL");
 * 本程序测试通过的浏览器:IE 5+、Firefox 1.0、Mozilla 1.7.5、Netscape 7.2、Opera 7.23
 * 友情提示:如果你将本程序用于强制弹出广告,请更多的想想浏览者的感受!
 
*/

<!--强制关闭-->
window.opener   
=   "meizz"
window.close();
</script>
</head>

<body>


</body>
</html>

posted @ 2007-12-20 15:17  kingboy  阅读(2996)  评论(0)    收藏  举报

刷新页面返回顶部