Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

How to show JavaScript message box before leaving current page?

make money online
gamer Offline referral

Posts: 193
Joined: May 2013
Reputation: 4

I have been noticing many websites have an alert message box that popups when you are trying to leave the current page, I know it is done with JavaScript but as I have no idea about JavaScript coding I need your help?
maria Offline referral

Posts: 242
Joined: May 2013
Reputation: 4

I don't recommend using this cause it's quite annoying and not very user friendly, but if you need it then power to you Wink

Find you <body> tag and replace it with <body onbeforeunload="ExitPage();">
Find <head> tag and after it add this J
PHP Code:
<script type="text/JavaScript"
alert ('popup message');
getit() {
askit confirm("popup message");
if (
askit == true)
alert('popup message');
if (
askit == false)
alert("popup message");

Replace popup message with your text!

Google this topic

User(s) browsing this thread: 1 Guest(s)