手机号不为11位

来源:互联网 发布:淘宝新建员工 编辑:程序博客网 时间:2024/04/28 23:51
function returnpass() {
var phonenum = $("#account").val();
var password = $("#password").val();
if (!phonenum) {
api.alert({
msg : '请输入手机号!'
});
} else if (!password) {
api.alert({
msg : '请输入新密码!'
});
} else if (!(/^\d{11}$/.test(phonenum))) {
api.alert({
msg : '手机号码输入有误!'
});
} else {
api.alert({
msg : '找回成功!'
});
api.closeWin({
});
}
}
0 0