<script type="text/javascript"
language="javascript">
var areYouReallySure = false;
var internalLink = false;
function areYouSure() {
if(allowPrompt)
{
if (!areYouReallySure && !internalLink &&
true) {
areYouReallySure = true;
return "YOUR MESSAGE TO READERS";
}
}
else
{
allowPrompt = true;
}
}
var allowPrompt = true;
window.onbeforeunload = areYouSure;
</script>
Replace YOUR MESSAGE TO READERS with the text that you want your readers to see when they click on the close button of the tag or browser.
Copy the code and go to html template editor for your blogger blog.
Find the following code:
<body expr:class='"loading" + data:blog.mobileClass'>
Just below this code, paste the copied code. Now whenever user will try to navigate from your page he/she will she the following alert box.
WARNING: This code will be executed during the editing and preview work. So it can irritate to also.