html:
名称1:<input class="seasoning_name" type="text" name="seasoning_name[]">
名称2:<input class="seasoning_name" type="text" name="seasoning_name[]">
名称3:<input class="seasoning_name" type="text" name="seasoning_name[]">
js:
seasoning_name = "";
$('.seasoning_name').each(function(){ seasoning_name += $(this).val();
}) if(seasoning_name == ""){ alert("至少填写一项配料!");
return false;
}