window.onbeforeunload =
function(evt) {if (quit()) {//do your actions, even launch xmlhttprequest } alert( } } else {'Test!'); function { } quit() if (confirm('Are you sure you want to quit?') == true ) return false;
}
alert(
function
{