五味子12138
2016-06-26 15:17
我把老师的视频下载下来,跟着视频一起写,怎么都不对
<script>
$(document).ready(function(){
$("#demoForm").validate({
debug:true,
rules:{
username:{
required:true,
//minlength:2,
// maxlength:10,
rangelength:[2,10],
remote:{
url:"remote.json",
type:"post",
data:{
loginTime:function(){
return +new Date;
}
}
}
},
password:{
required:true,
minlength:2,
maxlength:16,
},
},
message:{
username:{
required:"必须填写用户名",
minlength:"必须填写至少2位",
maxlength:"必须填写用户名至少10位"
},
password:{
required:"必须填写密码",
minlength:2,
maxlength:16,
},
},
});
});
</script>
jQuery插件——Validation Plugin
65871 学习 · 216 问题
相似问题
回答 1
回答 2