<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>
<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>
用心对待身边的一切,一切皆有可能!