window prevent reload code example
Example: prevent reload javascript
window.onbeforeunload = function() {
return "Dude, are you sure you want to leave? Think of the kittens!";
}
window.onbeforeunload = function() {
return "Dude, are you sure you want to leave? Think of the kittens!";
}