📄 sms push.mht
字号:
function ValidatorHookupControlID(controlID, val) {
if (typeof(controlID) !=3D "string") {
return;
}
var ctrl =3D document.all[controlID];
if (typeof(ctrl) !=3D "undefined") {
ValidatorHookupControl(ctrl, val);
}
else {
val.isvalid =3D true;
val.enabled =3D false;
}
}
function ValidatorHookupControl(control, val) {
if (typeof(control.tagName) =3D=3D "undefined" && =
typeof(control.length) =3D=3D "number") {
var i;
for (i =3D 0; i < control.length; i++) {
var inner =3D control[i];
if (typeof(inner.value) =3D=3D "string") {
ValidatorHookupControl(inner, val);
}=20
}
return;
}
else if (control.tagName !=3D "INPUT" && control.tagName !=3D =
"TEXTAREA" && control.tagName !=3D "SELECT") {
var i;
for (i =3D 0; i < control.children.length; i++) {
ValidatorHookupControl(control.children[i], val);
}
return;
}
else {
if (typeof(control.Validators) =3D=3D "undefined") {
control.Validators =3D new Array;
var ev;
if (control.type =3D=3D "radio") {
ev =3D control.onclick;
} else {
ev =3D control.onchange;
}
if (typeof(ev) =3D=3D "function" ) { =20
ev =3D ev.toString();
ev =3D ev.substring(ev.indexOf("{") + 1, =
ev.lastIndexOf("}"));
}
else {
ev =3D "";
}
var func =3D new Function("ValidatorOnChange(); " + ev);
if (control.type =3D=3D "radio") {
control.onclick =3D func;
} else { =20
control.onchange =3D func;
}
}
control.Validators[control.Validators.length] =3D val;
} =20
}
function ValidatorGetValue(id) {
var control;
control =3D document.all[id];
if (typeof(control.value) =3D=3D "string") {
return control.value;
}
if (typeof(control.tagName) =3D=3D "undefined" && =
typeof(control.length) =3D=3D "number") {
var j;
for (j=3D0; j < control.length; j++) {
var inner =3D control[j];
if (typeof(inner.value) =3D=3D "string" && (inner.type !=3D =
"radio" || inner.status =3D=3D true)) {
return inner.value;
}
}
}
else {
return ValidatorGetValueRecursive(control);
}
return "";
}
function ValidatorGetValueRecursive(control)
{
if (typeof(control.value) =3D=3D "string" && (control.type !=3D =
"radio" || control.status =3D=3D true)) {
return control.value;
}
var i, val;
for (i =3D 0; i<control.children.length; i++) {
val =3D ValidatorGetValueRecursive(control.children[i]);
if (val !=3D "") return val;
}
return "";
}
function Page_ClientValidate() {
var i;
for (i =3D 0; i < Page_Validators.length; i++) {
ValidatorValidate(Page_Validators[i]);
}
ValidatorUpdateIsValid(); =20
ValidationSummaryOnSubmit();
Page_BlockSubmit =3D !Page_IsValid;
return Page_IsValid;
}
function ValidatorCommonOnSubmit() {
event.returnValue =3D !Page_BlockSubmit;
Page_BlockSubmit =3D false;
}
function ValidatorEnable(val, enable) {
val.enabled =3D (enable !=3D false);
ValidatorValidate(val);
ValidatorUpdateIsValid();
}
function ValidatorOnChange() {
var vals =3D event.srcElement.Validators;
var i;
for (i =3D 0; i < vals.length; i++) {
ValidatorValidate(vals[i]);
}
ValidatorUpdateIsValid(); =20
}
function ValidatorValidate(val) { =20
val.isvalid =3D true;
if (val.enabled !=3D false) {
if (typeof(val.evaluationfunction) =3D=3D "function") {
val.isvalid =3D val.evaluationfunction(val);=20
}
}
ValidatorUpdateDisplay(val);
}
function ValidatorOnLoad() {
if (typeof(Page_Validators) =3D=3D "undefined")
return;
var i, val;
for (i =3D 0; i < Page_Validators.length; i++) {
val =3D Page_Validators[i];
if (typeof(val.evaluationfunction) =3D=3D "string") {
eval("val.evaluationfunction =3D " + val.evaluationfunction =
+ ";");
}
if (typeof(val.isvalid) =3D=3D "string") {
if (val.isvalid =3D=3D "False") {
val.isvalid =3D false; =20
Page_IsValid =3D false;
}=20
else {
val.isvalid =3D true;
}
} else {
val.isvalid =3D true;
}
if (typeof(val.enabled) =3D=3D "string") {
val.enabled =3D (val.enabled !=3D "False");
}
ValidatorHookupControlID(val.controltovalidate, val);
ValidatorHookupControlID(val.controlhookup, val);
}
Page_ValidationActive =3D true;
}
function ValidatorConvert(op, dataType, val) {
function GetFullYear(year) {
return (year + parseInt(val.century)) - ((year < val.cutoffyear) =
? 0 : 100);
}
var num, cleanInput, m, exp;
if (dataType =3D=3D "Integer") {
exp =3D /^\s*[-\+]?\d+\s*$/;
if (op.match(exp) =3D=3D null)=20
return null;
num =3D parseInt(op, 10);
return (isNaN(num) ? null : num);
}
else if(dataType =3D=3D "Double") {
exp =3D new RegExp("^\\s*([-\\+])?(\\d+)?(\\" + val.decimalchar =
+ "(\\d+))?\\s*$");
m =3D op.match(exp);
if (m =3D=3D null)
return null;
cleanInput =3D m[1] + (m[2].length>0 ? m[2] : "0") + "." + m[4];
num =3D parseFloat(cleanInput);
return (isNaN(num) ? null : num); =20
}=20
else if (dataType =3D=3D "Currency") {
exp =3D new RegExp("^\\s*([-\\+])?(((\\d+)\\" + val.groupchar + =
")*)(\\d+)"
+ ((val.digits > 0) ? "(\\" + val.decimalchar + =
"(\\d{1," + val.digits + "}))?" : "")
+ "\\s*$");
m =3D op.match(exp);
if (m =3D=3D null)
return null;
var intermed =3D m[2] + m[5] ;
cleanInput =3D m[1] + intermed.replace(new RegExp("(\\" + =
val.groupchar + ")", "g"), "") + ((val.digits > 0) ? "." + m[7] : 0);
num =3D parseFloat(cleanInput);
return (isNaN(num) ? null : num); =20
}
else if (dataType =3D=3D "Date") {
var yearFirstExp =3D new =
RegExp("^\\s*((\\d{4})|(\\d{2}))([-./])(\\d{1,2})\\4(\\d{1,2})\\s*$");
m =3D op.match(yearFirstExp);
var day, month, year;
if (m !=3D null && (m[2].length =3D=3D 4 || val.dateorder =3D=3D =
"ymd")) {
day =3D m[6];
month =3D m[5];
year =3D (m[2].length =3D=3D 4) ? m[2] : =
GetFullYear(parseInt(m[3], 10))
}
else {
if (val.dateorder =3D=3D "ymd"){
return null; =09
} =09
var yearLastExp =3D new =
RegExp("^\\s*(\\d{1,2})([-./])(\\d{1,2})\\2((\\d{4})|(\\d{2}))\\s*$");
m =3D op.match(yearLastExp);
if (m =3D=3D null) {
return null;
}
if (val.dateorder =3D=3D "mdy") {
day =3D m[3];
month =3D m[1];
}
else {
day =3D m[1];
month =3D m[3];
}
year =3D (m[5].length =3D=3D 4) ? m[5] : =
GetFullYear(parseInt(m[6], 10))
}
month -=3D 1;
var date =3D new Date(year, month, day);
return (typeof(date) =3D=3D "object" && year =3D=3D =
date.getFullYear() && month =3D=3D date.getMonth() && day =3D=3D =
date.getDate()) ? date.valueOf() : null;
}
else {
return op.toString();
}
}
function ValidatorCompare(operand1, operand2, operator, val) {
var dataType =3D val.type;
var op1, op2;
if ((op1 =3D ValidatorConvert(operand1, dataType, val)) =3D=3D null)
return false; =20
if (operator =3D=3D "DataTypeCheck")
return true;
if ((op2 =3D ValidatorConvert(operand2, dataType, val)) =3D=3D null)
return true;
switch (operator) {
case "NotEqual":
return (op1 !=3D op2);
case "GreaterThan":
return (op1 > op2);
case "GreaterThanEqual":
return (op1 >=3D op2);
case "LessThan":
return (op1 < op2);
case "LessThanEqual":
return (op1 <=3D op2);
default:
return (op1 =3D=3D op2); =20
}
}
function CompareValidatorEvaluateIsValid(val) {
var value =3D ValidatorGetValue(val.controltovalidate);
if (ValidatorTrim(value).length =3D=3D 0)
return true;
var compareTo =3D "";
if (null =3D=3D document.all[val.controltocompare]) {
if (typeof(val.valuetocompare) =3D=3D "string") {
compareTo =3D val.valuetocompare;
}
}
else {
compareTo =3D ValidatorGetValue(val.controltocompare);
}
return ValidatorCompare(value, compareTo, val.operator, val);
}
function CustomValidatorEvaluateIsValid(val) {
var value =3D "";
if (typeof(val.controltovalidate) =3D=3D "string") {
value =3D ValidatorGetValue(val.controltovalidate);
if (ValidatorTrim(value).length =3D=3D 0)
return true;
}
var args =3D { Value:value, IsValid:true };
if (typeof(val.clientvalidationfunction) =3D=3D "string") {
eval(val.clientvalidationfunction + "(val, args) ;");
} =20
return args.IsValid;
}
function RegularExpressionValidatorEvaluateIsValid(val) {
var value =3D ValidatorGetValue(val.controltovalidate);
if (ValidatorTrim(value).length =3D=3D 0)
return true; =20
var rx =3D new RegExp(val.validationexpression);
var matches =3D rx.exec(value);
return (matches !=3D null && value =3D=3D matches[0]);
}
function ValidatorTrim(s) {
var m =3D s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
return (m =3D=3D null) ? "" : m[1];
}
function RequiredFieldValidatorEvaluateIsValid(val) {
return (ValidatorTrim(ValidatorGetValue(val.controltovalidate)) !=3D =
ValidatorTrim(val.initialvalue))
}
function RangeValidatorEvaluateIsValid(val) {
var value =3D ValidatorGetValue(val.controltovalidate);
if (ValidatorTrim(value).length =3D=3D 0)=20
return true;
return (ValidatorCompare(value, val.minimumvalue, =
"GreaterThanEqual", val) &&
ValidatorCompare(value, val.maximumvalue, "LessThanEqual", =
val));
}
function ValidationSummaryOnSubmit() {
if (typeof(Page_ValidationSummaries) =3D=3D "undefined")=20
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -