使用Jquery的Validate进行校验
使用Jquery的Validate进行校验
<script type="text/javascript">
$(function () {
$("#form1").validate({
rules: {
Email: {
required: true,
email: true
},
ID: { required: true },
UserName: { maxlength: 5, required: true }
},
messages: {
Email: "*错的邮箱",
ID: "*必填",
UserName: "*"
}
});
});