This code runs fine on Firefox, but I can\'t make the unload event work on Chrome anymore. Did Chrome stop supporting the unload event?
This is my c
You don't trigger anything - you just execute the expression which you want to add as a handler:
window.onunload = function(event) { alert("Are you sure 2?"); };