how to prevent page reload javascript 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!";
}