ShopAdmin/Js/validate.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//计算字符数,一个中文2个字符
function fLen(Obj) {
var nCNLenth = 0;
var nLenth = Obj.length;
for (var i = 0; i < nLenth; i++) {
if (Obj.charCodeAt(i) > 255) {
nCNLenth += 2;
} else {
nCNLenth++;
}
}
return nCNLenth;
}
function checkPWD(me) {
_('chkPwd').style.display = 'none';
_("chkPwd").innerHTML = '';
if (me == "") {
_("chkpswd").className = "PSW_P_0";
_("chkPwd").innerHTML = "密码不能为空";
_('chkPwd').style.display = '';
return false;
} else if (me.length <5) {
_("chkpswd").className = "PSW_P_1";
_("chkpswdcnt").innerHTML = "太短最小要5位";
return false;
} else if (!isPassword(me) || !/^[^%&]*$/.test(me) || me.length > 16) {
_("chkpswd").className = "PSW_P_0";
_("chkPwd").innerHTML = "请输入5~16位字符的密码,不包含&或$";
_('chkPwd').style.display = '';
return false;
}
//else if (_("password").value == _("username").value || _("password").value == (_("username").value + "@126.com")) {
// _("chkpswd").className = "PSW_P_0";
// _("chkPwd").innerHTML = "密码不能与注册的用户一致";
// _('chkPwd').style.display = '';
// return false;
// }
else {
var csint = checkStrong(me);
switch (csint) {
case 1:
_("chkpswdcnt").innerHTML = "密码太弱,请用数字与字母组合";
_("chkpswd").className = "PSW_P_" + (csint + 1);
break;
case 2:
_("chkpswdcnt").innerHTML = "一般";
_("chkpswd").className = "PSW_P_" + (csint + 1);
break;
case 3:
_("chkpswdcnt").innerHTML = "很强";
_("chkpswd").className = "PSW_P_" + (csint + 1);
break;
}
return true;
}
}
function isPassword(str) {
var len;
后面还有 80 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
