Function isempty (Pobj, errmsg) {var obj = evAl (pobj); if (obj == null || Trim (obj.value) == "") {if (errmsg == null || errmsg == "") Alert ("Enter is empty!"); else alert (errmsg); obj.focus (); return false;} return true;
/ / Judgment whether it is a digital function isnumber (pobj, errmsg) {var obj = evAl (pobj); strref = "1234567890"; if (! ISempty (pobj, errmsg) Return False; for (i = 0; i Function TRIM (STR) {IF (str.Charat (0) == "") {str.slice (1); str = trim (str);} Return Str;} Function isleApyear (Year) {IF ((Year% 4 == 0 && Year% 100! = 0) || (Year% 400 == 0)) {Return true;} Return False;} Function isempty (Pobj, errmsg) {var obj = evAl (pobj); if (obj == null || Trim (obj.value) == "") {if (errmsg == null || errmsg == "") Alert ("Enter is empty!"); else alert (errmsg); obj.focus (); return false;} Return true;} // Decision is Digital Function isnumber (Pobj, errmsg) {var obj = evAl (POBJ ); Strref = "1234567890"; if (! ISempty (pobj, errmsg) Return False; for (i = 0; i / / Judgment is the form of money in the form of money (pobj, errmsg) {var obj = evAl (pobj); strref = "1234567890."; if (! ISempty (pobj, errmsg) Return False; for (i = 0; I Function isdate (CheckText) {var datetime; var year, month, day; var gone, gtwo; if (Trim (checktext.value)! = "") {datetime = trim (checktext.value); if (DateTime.length = = 10) {year = datetime.substring (0,4); if (isnan == true) {alert ("Please enter the date! Format is (YYYY-MM-DD) / N example (2001-01- 01)! "); CheckText.focus (); return false;} gone = datetime.substring (4, 5); Month = DateTime.Substring (5,7); if (isnan == true) {Alert ("Please enter the date! YYYY-MM-DD) / N example (2001-01-01)!"); Checktext.focus (); return false;} gtwo = datetime.substring (7,8); Day = datetime.substring (8, 10); if (isnan (day) == true) {alert ("Please enter the date! Format is (YYYY-MM-DD) / N example (2001-01-01)!" CheckText.focus (); return false;} IF ((gtwo == "-") && (gtwo == ")) {if (Month <1 || Month> 12) {Alert (" Month must Between 01 and 12! "); Checktext.focus (); return false;} if (DAY <1 || day> 31) {alert (" Date must be between 01 and 31! "); CheckText.foCus ();} Else {if (Month == 2) {if (isleapyear && day> 29) {Alert ("February Date must be between 01 to 29!"); CheckText.foC US (); return false;} if (! isleapyear (year) && day> 28) {Alert ("February Date must be between 01 to 28!"); checktext.focus (); return false;}}} (MONTH == 4 || Month == 6 || Month == 9 || Month == 11) && (Day> 30)) {Alert ("in four, six, nine, Nirtiend / N" must 01 to 30 Between ""); checktext.focus (); return false;}} else}}} else {Alert ("Please enter the date! YYYY-MM-DD) / N (2001-01-01)" CheckText.focus (); return false;}} else {alert (" Please enter the date! Format is (YYYY-MM-DD) / N (2001-01-01) "); checktext.focus (); return false;}} else {return true;} Return true;} script >