-
Do you want to leave?
Hi, On my site i would like to have a box that when someone clicks to go to a different site on my site it will say Do you want to leave my site? then in the bottom of the box there will be yes or no bottons. does anyone know the html code for this if so please tell me!?
-
i think :
<BODY onbeforeunload="HandleOnClose()">
Then, add the following JavaScript code into the <HEAD> section of your ASPX page:
<script language="javascript">
<!--
function HandleOnClose() {
if (event.clientY < 0) {
event.returnValue = 'Are you sure you want to leave the page?';
}
}
//-->
</script>