Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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?';
};

Comment

PREVIOUS NEXT
Code Example
Javascript :: map every second character jaavascript 
Javascript :: search nested array in react javascript 
Javascript :: react i18n with parameeter 
Javascript :: delete character between index 
Javascript :: geolocation 
Javascript :: console.log object functions js 
Javascript :: readystate==4 
Javascript :: emergency food meme 
Javascript :: javascript encrypt decrypt 
Javascript :: javascript array erstellen 
Javascript :: VS Code Auto Import is bugging usestate 
Javascript :: Remove an item from the beginning of an Array 
Javascript :: destructuring object 
Javascript :: sitecore rendering paramaters get 
Javascript :: Reactjs exemple class component 
Javascript :: shadow generator react native 
Javascript :: Connect node.js with react.js 
Javascript :: check unique object in array javascript site:stackoverflow.com 
Javascript :: Match All Letters and Numbers freecodecamp 
Javascript :: react clear input after button click 
Javascript :: find consecutive numbers in an array javascript 
Javascript :: node express 
Javascript :: javascript getHours from epoch 
Javascript :: expo cli vs react native cli 
Javascript :: react native communicate with webview 
Javascript :: get date in milliseconds javascript 
Javascript :: javascript get elements by multiple class names 
Javascript :: mongoose search query for a word in a field 
Javascript :: prettier overrides 
Javascript :: angular get route last segment 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =