标签:style blog io color sp on div log bs
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; }
jQuery 判断表单中多个 input text 中至少有一个不为空
标签:style blog io color sp on div log bs
原文地址:http://www.cnblogs.com/dee0912/p/4165821.html