onbeforeunload函数中的自定义消息

时间:2017-06-30 09:08:13

标签: javascript

我想在onbeforeunload功能

中添加自定义消息
window.onbeforeunload = function() {                
    if(changes){  
        return 'Are you sure you want to leave without saving changes?'; 
    }               
}

但它显示默认消息,是否有可能覆盖它?

0 个答案:

没有答案