stat/js/mgPublic.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*可 公用 的 验证类*/
/*-------------------------------------------*/
/*只能是英文 onkeydown="onlyEng();"
------------------------------------------*/
function onlyEng() {
if (!(event.keyCode >= 65 && event.keyCode <= 90)) {
event.returnvalue = false;
}
else {
return true;
}
}
/* 判断用户名是否为: 数字 字母(要验证的值value,span ID,ErrMsg)
------------------------------------------ */
function notchinese(str, spanlb, txtMsg) {
var reg = /[^A-Za-z0-9]/g
if (reg.test(str)) {
if (document.getElementById(spanlb) != null) {/*显示错误信息*/
document.getElementById(spanlb).innerHTML = txtMsg;
}
return (false);
} else {
if (document.getElementById(spanlb) != null) {/*清除错误信息*/
document.getElementById(spanlb).innerText = "";
}
return (true);
}
}
/*------------------------------------------*/
//验证是否为空(长度 范围)
function IsNull(controlID, min, max) {
if (document.getElementById(controlID) != null) {/*避免为null*/
var str = document.getElementById(controlID).value;
str = str.replace(/(^\s*)|(\s*$)/g, ""); //去掉左右空格
if (str.length < min || str.length > max) {
return false;
}
else {
return true;
}
}
return true;
}
/*------------------------------------------*/
//验证长度(必须大于)
function CheckLength(controlID, len) {
if (document.getElementById(controlID) != null) {
var str = document.getElementById(controlID).value;
str = str.replace(/(^\s*)|(\s*$)/g, ""); //去掉左右空格
if (str.length < len) {
return false;
}
else {
return true;
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
