页面关闭时弹出广告
<head?>
????<title>關(guān)閉時(shí)彈出頁(yè)demo,暫時(shí)支持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>關(guān)閉時(shí)彈出頁(yè)demo,暫時(shí)支持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>
轉(zhuǎn)載于:https://www.cnblogs.com/skyangell/archive/2011/03/30/1999356.html
總結(jié)
- 上一篇: new TypeToken<List>>
- 下一篇: E4X 完全攻略