默认情况下,$.serialize()会忽略禁用的输入元素.有解决方法吗? 暂时启用它们. var myform = $('#myform'); // Find disabled inputs, and remove the "disabled" attributevar disabled = myform.find(':input:disabled').remov
var myform = $('#myform'); // Find disabled inputs, and remove the "disabled" attribute var disabled = myform.find(':input:disabled').removeAttr('disabled'); // serialize the form var serialized = myform.serialize(); // re-disabled the set of inputs that you previously enabled disabled.attr('disabled','disabled');