网站关闭之后弹出窗口代码(JS退弹代码)如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
<span style="color: #003366;font-weight: bold">var</span> u <span style="color: #339933">=</span> <span style="color: #3366CC">"6BF52A52-394A-11D3-B153-00C04F79FAA6"</span><span style="color: #339933">;</span> 
<span style="color: #003366;font-weight: bold">function</span> ext<span style="color: #009900">(</span><span style="color: #009900">)</span> <span style="color: #006600;font-style: italic">//在关闭IE窗口的时候弹出 </span>
<span style="color: #009900">{</span> 
<span style="color: #000066;font-weight: bold">if</span><span style="color: #009900">(</span>window.<span style="color: #660066">event</span>.<span style="color: #660066">clientY</span><span style="color: #339933"><</span><span style="color: #CC0000">132</span> <span style="color: #339933">||</span> altKey<span style="color: #009900">)</span> iie.<span style="color: #660066">launchURL</span><span style="color: #009900">(</span>popURL<span style="color: #009900">)</span><span style="color: #339933">;</span> 
<span style="color: #009900">}</span> 
<span style="color: #003366;font-weight: bold">function</span> brs<span style="color: #009900">(</span><span style="color: #009900">)</span> <span style="color: #006600;font-style: italic">//插入Object </span>
<span style="color: #009900">{</span> 
document.<span style="color: #660066">body</span>.<span style="color: #660066">innerHTML</span><span style="color: #339933">+=</span><span style="color: #3366CC">"<object id=iie width=0 height=0 classid='CLSID:"</span><span style="color: #339933">+</span>u<span style="color: #339933">+</span><span style="color: #3366CC">"'></object>"</span><span style="color: #339933">;</span> 
<span style="color: #009900">}</span> 
 
<span style="color: #003366;font-weight: bold">var</span> popURL <span style="color: #339933">=</span> <span style="color: #3366CC">'http://s.click.taobao.com/t_1?i=qzfe7jwyssnWkA%3D%3D&p=mm_25507331_0_0&n=11'</span> <span style="color: #339933">;</span> <span style="color: #006600;font-style: italic">//这里修改成你的退弹网址 </span>
<span style="color: #000066;font-weight: bold">eval</span><span style="color: #009900">(</span><span style="color: #3366CC">"window.attachEvent('onload',brs);"</span><span style="color: #009900">)</span><span style="color: #339933">;</span> 
<span style="color: #000066;font-weight: bold">eval</span><span style="color: #009900">(</span><span style="color: #3366CC">"window.attachEvent('onunload',ext);"</span><span style="color: #009900">)</span><span style="color: #339933">;</span>