Bagaimana membatasi cuti halaman di javascript
window.addEventListener("beforeunload", function(e){
// Do something
}, false);
Good Gnu
window.addEventListener("beforeunload", function(e){
// Do something
}, false);
window.onbeforeunload = function(){
// Do something
}