2011-08-04 127 views
3
$(window).bind("beforeunload",function(){ 
    return "cant be seen in ff"; 
}); 

的问题是,我不能看在我的FireFox浏览器的确认框“不能在FF可见”,但在其他浏览器效果很好(IE浏览器)火狐beforeunload问题

任何解决方案?

回答

0

做到这一点

<script> 
    window.onbeforeunload = function(){ 
     return "cant be seen in ff"; 
    } 
</script> 
+1

我看不出有任何区别....加上产生的同... – rhapsodyn

+0

好了,这对我的作品 - 只是试图在FF 5.不能测试你的jQuery版本,没有jQuery的一应俱全,例如作为书签(*多*喜欢YUI3)。 –

+0

这没有什么区别 – naugtur

1
confirmOnPageExit : function(display) { 
     if (true == display) { 
     var message; 
     /* if unsaved changes exist, display a warning */ 
     if (false !== form_structure.unsaved_changes) { 
      message = 'Warning! Changes to the form builder have not been saved.'; 
        return message; 
     } 
     } 
}, 

window.onbeforeunload = confirmOnPageExit(false);