Originally Posted by Fedy
var savebeforeexit = window.confirm("Are you sure?");
Calls to alert() confirm() and prompt() should only ever be used for debugging, they should never be used in a live web page.
Helping others to solve their computer problem at http://www.felgall.com/