第一季

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
回调方法里面只能返回 字符串

window.onbeforeunload = funcRef
  • funcRef is a reference to a function or a function expression
  • The function should assign a string value to the returnValue property of the Event object and return the same string

 

window.onbeforeunload = function(e) {
    return 'Dialog text here.';
};

jQuery(window).unbind("beforeunload").bind("beforeunload", function() {
return ' ';
});

posted on 2013-02-28 11:38  第一季  阅读(759)  评论(0编辑  收藏  举报