In this tip i will tell you a way to open a new window when someone leave a web page, this code may be what you're looking for.We can use <body> Tag onUnload event for this .
This below HTML code will open the web page which you specify as soon as you leave the original web page.
This below HTML code will open the web page which you specify as soon as you leave the original web page.
<body onUnload=”window.open('http://www.domain.com'); self.blur();”>
Copy paste this code in body tag of your page and replace www.usetricks.com with your desire page url.
onUnload=”window.open('http://www.usetricks.com');
self.blur();”