<div class="codetitle"> <span><a style="CURSOR: pointer" data="32998" class="copybut" id="copybut32998" onclick="doCopy('code32998')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code32998"> <br><script language="javascript"> <BR><!-- <BR>function SetCookie(name,value) //两个参数,一个是cookie的名子,一个是值 <BR>{ <BR>var exp = new Date(); //new Date("December 31, 9998"); <BR>exp.setTime(exp.getTime() + 60*60*1000); //24小时 Days*24*60*60*1000 <BR>document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); <BR>} <BR>function getCookie(name) //取cookies函数 <BR>{ <BR>var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); <BR>if(arr != null) return unescape(arr[2]); return null; <BR>} <br><br>if (getCookie('ads')!='cc') <BR>{ <BR>var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; <BR>var popURL = 'http://www.jb51. net'; //这里修改成你的退弹网址 <br><br>function ext() //在关闭IE窗口的时候弹出 <BR>{ <BR>if(window.event.clientY<132 || altKey) iie.launchURL(popURL); <BR>} <br><br>function brs() //插入Object <BR>{ <BR>document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'>"; <BR>} <br><br>eval("window.attachEvent('onload',brs);"); <BR>eval("window.attachEvent('onunload',ext);"); <BR>SetCookie ("ads", "cc") <BR>} <BR>//--> <BR></script> <br> </div>