一,登录界面验证码(初步判定)
//页面载入函数
$(function(){
myf();
//给验证码添加点击事件
$("#yzm").click(function(){
myf();//刷新
});
$("#myForm").validate({
rules:{
//表单字段规则
uname:{
required:true,
rangelength:[6,10]
},
upwd1:"required",
},
messages:{
//错误信息
uname:{
required:"用户名必填",
rangelength:"你个山炮"
}
}
});
})
})
//随机验证码=刷新验证码
function myf(){
//数组下标:0-33
var arr = new Array(2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U',&