window.onbeforeunload = confirmExit; function confirmExit() { if (!e) var e = window.event; { if (((e.clientX || e.clientX) < 0) || ((e.clientY || e.clientY) < 0))//close button { return "You are about to close the browser"; } else if (e.altKey == true || e.ctrlKey == true) // ALT + F4 { return "You are about to close the browser"; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)