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
Post a Comment