Answers for "confirm closing tab"

0

confirm closing tab

window.onbeforeunload = function (e) {
    e = e || window.event;

    // For IE and Firefox prior to version 4
    if (e) {
        e.returnValue = 'Sure?';
    }
    // For Safari
    return 'Sure?';
};
Posted by: Guest on February-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language