jQuery ui插件的使用方法代码实例_jquery
程序员文章站
2022-06-06 10:42:19
...
复制代码 代码如下:
$(function () {
$('#form1').validate({
rules: {
txtUser: { required: true, minlength: 6 },
txtPassword: { required: true, minlength: 6 },
txtConfirm: { required: true, minlength: 6, equalTo: "#password" },
txtHomePage: { required: true, url: true },
txtBirthday: { required: true, dateISO: true },
txtXueYa: { required: true, digits: true },
txtEmail: { required: true, email: true }
},
errorshow: function (error, element) {
error.appendTo(element.siblings('span'));
}
})
})