How to change emphasis on confirm javascript buttons? -


i have following javascript:

var leave_page_confirm = true;  function save_data_check() {     var msg;     if (leave_page_confirm === true) {         $('.input-right').each(function() {             if (this.value) {                 msg = 'you have unsaved data on page.';                 return false;             }         });     }     return msg; }  window.onbeforeunload = save_data_check; 

this confirm box displays when have unsaved data in form on pages.

however, when appears emphasis (default button) "leave page" emphasis on "stay on page" despite quite bit of googling, can't seem find code changes emphasis of buttons on confirm alert.

is there way accomplish this?

you might want refer question:

how personalize alert buttons - window.confirm() , window.alert()

basically, can't. can make own modals kind of thing , have full control on looks , buttons emphasized.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -