就是在学rotate远程校验的时候,谁有写好的代码吗
我把老师的视频下载下来,跟着视频一起写,怎么都不对
我把老师的视频下载下来,跟着视频一起写,怎么都不对
2016-06-26
<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>
举报