JS Verification File/** * Verify mobile number format * @param {Object} ID/function Checkmobile (ID) {var val = $ ("#" + ID). val ();
var reg =/^1[3|4|5|8][0-9]\d{8}$/; if (!) (
Reg.test (val))) {$ ("#" + ID). val ("");
$ ("#" + ID). focus ();
return false;
return true;
/** * Verify number * @param {Object} ID/function Checknum (ID) {var val = $ ("#" + ID). val ();
var reg =/^\d+$/; if (!) (
Reg.test (val))) {$ ("#" + ID). val ("");
$ ("#" + ID). focus ();
return false;
return true;
/** * Verify Mailbox * @param {Object} ID/function Checkemail (ID) {var val = $ ("#" + ID). val (); var reg=/^ (\w-*\.*) +@ (\w-?)
+ (\.\w{2,}) +$/; if (!) (
Reg.test (val))) {$ ("#" + ID). val ("");
$ ("#" + ID). focus ();
return false;
return true;
/** * Check content is not empty * @param {Object} ID/function Checknull (ID) {var val = $ ("#" + ID). val (). Trim (); if (val = = Undefined | | val = = "") {$ ("#" + ID). val ("");
$ ("#" + ID). focus ();
return false;
return true;
/** * Check URL format is correct * @param {Object} ID/function Checkwebsite (ID) {var val = $ ("#" + ID). val (); var reg=/[a-za-z0-9][-a-za-z0-9]{0,62} (\.[ A-ZA-Z0-9][-A-ZA-Z0-9]{0,62}) +\.?
/;; if (!) ( Reg.test (val)) {alert ("URL format is not correct.)
");
$ ("#" + ID). val ("");
$ ("#" + ID). focus ();
return false;
return true;
}