Acara Penutupan Jendela JS

window.onbeforeunload = function(){
  alert("You are now leaving, are you sure?")
}
DatMADCoder