1. Try adding this $('input', '#submForm').each(function(){ $(this).val() == "" && $(this).remove(); }) OR $('input:text[value=""]', '#submForm').remove(); before var serialized = $('#submForm').serialize() 来源:http://stackoverflow.com/a/6240625 You cannot use attribute selector for value as it is a changing property. 2. Use .filter() $(document).ready(function () { $('#myForm').submit(function () { $(this).find(":input").filter(function () { return $.trim(this.value).length > 0 }).serialize(); alert('JavaScript done'); }); }); Demo: Fiddle Note: just serializing the input fields does not change in form submission, it can be used only if the form is submitted via ajax. If you want to do a normal form submission but want to remove the empty fields then use .remove()…