点击提交按钮时,如何阻止被调用的onbeforeunload?
$(document).ready(function() { $('input:text,input:checkBox,input:radio,textarea,select').one('change',function() { //('BODY').attr('onbeforeunload',"return 'Leaving this page will cause any unsaved data to be lost.';"); if( window.onbeforeunload = function() { return 'You have unsaved changes!'; } }); });