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

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - 那时花开

VS2012 快捷键 VS Resharper 设置 TFS2012 独占签出实现 WinForm 生产环境、测试环境 多配置-App.config(分享) TFS2010 服务器名称变更bug 怎样和客户一起搞定需求 MSMQ XP 0x433 430 错误处理 ajax 同步异步模式问题 asp.net membership 配置错误 Test Concurrent 本地安全策略 脚本 在asp.net 3.5中sql 2005数据库缓存依赖 关于 p3p ie 跨域 问题 jQuery插入,复制、替换和删除节点 jquery 常用方法整理 存储过程生成代码 sql2000版 It 人大多路线图 收集常用数据库设计技巧 PowerDesigner 常用设置 mssql 数据库文档生成
页面关闭时弹出广告
那时花开 · 2011-03-30 · via 博客园 - 那时花开

<head >
    
<title>关闭时弹出页demo,暂时支持ie版本</title><script type="text/javascript">
        
var G_Event;
        
function OpenUrl(url) {
            document.getElementById(
"palyer").launchURL(url);
        }
        
function Init() {
            document.write(
"<object id='palyer' width='0' height='0' classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'></object>");
        }
        
function BeginClose() {
            window.open(
"http://www.baidu.com");     //广告方式   
            OpenUrl("http://www.baidu.com"); //window player 方式
        }
        window.onmousemove 
= function(e) {
            G_Event 
= e ? e : window.event;
        }
        window.onbeforeunload 
= function(e) {
            e 
= window.event ? window.event : G_Event;
            
if (window.event) { //ie
                if (e.clientY < 0 || e.altKey) {
                    BeginClose();                
                } 
else {
                    
//ie刷新
                }
            }
            
else {
                BeginClose();
            }
        }
        
    
</script>
    
<script>
            
//必须的
            Init();
    
</script>
</head>
<body></body>

用心对待身边的一切,一切皆有可能!

发表于 2011-03-30 01:08  那时花开  阅读(285)  评论()    收藏  举报