//使用jQuery实现 $("#fm :input").change(function() { $("#fm").data("changed",true); }); //提交前判断 if ($("#fm").data("changed")) { // submit the fm }