问题是我无法找到验证表单中是否选中了单个复选框的方法
HTML标记:
<label for="terms">terms : </label> <input type="checkBox" name="terms" id="terms">
jQuery代码:
rules: { terms: "required" },messages:{ terms: "check the checBox" }
任何帮助,将不胜感激.
<label for="terms">terms : </label> <input type="checkBox" name="terms" value="1" id="terms">
rules: { terms: { required : true } },messages:{ terms: { required : "check the checBox" } }
jsfiddle:http://jsfiddle.net/mZ6zJ/