why window close event took time code example
Example: window closing event js
window.onbeforeunload = function(){
alert("You are now leaving, are you sure?")
}
window.onbeforeunload = function(){
alert("You are now leaving, are you sure?")
}