Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

web app let user 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 :: replace all swear words using bookmarklet 
Javascript :: how to call function with only selected arguments in javascript 
Javascript :: giphy javascript github 
Javascript :: insert property in json file with bash 
Javascript :: react native store sensitive data in redux 
Javascript :: js catch errors on listeners 
Javascript :: tooltip in javasrript UI 
Javascript :: javascript sort strings alphabetically 
Javascript :: une expression de fonction en javascript 
Javascript :: get table schema with knex 
Javascript :: next js find all the rerenders 
Javascript :: display only initials from full name reactjs 
Javascript :: string .length js 
Javascript :: is javascript case sensitive 
Javascript :: object for loop 
Javascript :: javascript select element have long word 
Javascript :: window reload in only 767 screen 
Javascript :: vuex dispatch is a promise 
Javascript :: jspdf text position 
Javascript :: generate tabuada java script 
Javascript :: npm react native turn by turn navigation 
Javascript :: srcset vue 
Javascript :: checkPalindrome 
Javascript :: cache variables that need calculation 
Javascript :: find first and last occurence in knockout js template 
Javascript :: check textbox value on ng-change value == in angular 
Javascript :: await reserved word testcafe using await in loop 
Javascript :: image continuous changing div 
Javascript :: how to wait for an exec command to fininsh in nodejs 
Javascript :: Regular Expressions: Find More Than the First Match 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =