複製程式碼 程式碼如下: <br>// $(function () {<br>// $('#a').validate({<br>// rules: {<br>// username: { required: true, minlength: 6, maxlength: 12 },<br>// email: { required: true, email: true }<br>// },<br>// errorshow: function (error, element) {<br>// error.appendTo(element.siblings('span'));<br>// } <p>// })</p> <p><br> // })<br> $(function () {<br> $('#a').validate({<br> rules: {<br> username: { required: true, minlength: 6, maxlength: 12 },<br> email: { required: true, email: true },<br> pwd: { required: true, rangelength:[6,6] },<br> again: { required: true, equalTo: ($('#aa')) }, //这里一定是id <br> birthday:{date:true},<br> blood:{digits:true}<br> },<br> errorshow: function (error, element) {<br> error.appendTo(element.siblings('span'));<br> }</p> <p> })</p> <p> })<br> 用户名:邮箱:密码:确认密码:生日:血压: