var t = $(‘form‘).serializeArray(); $.each(t, function(index, item) { if (item.value.length == 0) { formHasEmpty = true; return false; } })
遍历表单数据
原文:https://www.cnblogs.com/wjqbooks/p/11922432.html