/ *** Checkinteger function verifies whether this box is input to the integer type data, the returned value is true and false, true and false; ** Object target object, Desc English description. * /
Function Checkinteger (Object, DESC) {
Var strinteger = Object.value;
IF (strinteger.length == 0) {
Return True;
} else {
VAR pattern = / ^ -? / d $ /;
IF (strinteger.match (pattern) == null) {
Alert ("" desc "" must be a number, please modify! ");
Object.focus ();
Return False;
} else {
Return True;
}
}
}