var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; function ext() //Pop up when closing the IE window { if(window.event.clientY<132 || altKey) iie.launchURL(popURL); } function brs() //Insert Object { document.body.innerHTML =""; } var popURL = 'http://www.jb51.net'; //Change this to your exit Eject URL eval("window.attachEvent('onload',brs);"); eval("window.attachEvent('onunload',ext);");
Add the following code to the bounce: The following code adds cookie control, and we will discuss it once every 24 hours
var u = "jb51"; function ext() //Close the IE window { if(window.event.clientY<132 || altKey){ var ck=getCookie("in24"); if(ck==null || ck= =undefined){ iie.launchURL(popURL); addCookie("in24","in24",24); } }
} function brs () //Insert Object { document.body.innerHTML =""; }
var popURL = 'http://jb51.net'; //Change this to your bounce URL eval("window.attachEvent('onload',brs); "); eval("window.attachEvent('onunload',ext);");
function addCookie(objName,objValue,objHours){//Add cookie var str = objName "=" escape(objValue); if(objHours > 0){//When it is 0, no expiration time is set, and the cookie will disappear automatically when the browser is closed var date = new Date() ; var ms = objHours*3600*1000; date.setTime(date.getTime() ms); str = "; expires=" date.toGMTString(); } document.cookie = str; }
function getCookie(objName){//Get the value of the cookie with the specified name var arrStr = document.cookie.split("; "); for(var i = 0;i < arrStr.length;i ){ var temp = arrStr[i].split("="); if(temp[0] == objName) {return unescape(temp[1]);} } }
function delCookie(name){//In order to delete the cookie with the specified name, you can set its expiration time to the past time var date = new Date(); date.setTime(date.getTime() - 10000); document.cookie = name "=a; expires=" date.toGMTString(); }
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn