function vcheck_isnull(vstr){ if(vstr==''||vstr==null){ return false; }else{ return true; } } function vcheck_iszero(vstr){ if(vstr==0){ return false; }else{ return true; } } function vcheck_length(vstr,vmin,vmax){ vstr=vstr.trim(); var vlen=vstr.length; if(vmin>0&&vmax>0&&vmin!=vmax){ if(vlenvmax){ return false; } }else if(vmin>0){ if(vlen0){ if(vlen>vmax){ return false } } return true; } function vcheck_mobilephone(str){ if (str.match(/^(1[0-9][0-9]|15[0|3|6|7|8|9]|18[6|8|9])\d{8}$/) == null) { return false; } else { return true; } } function vcheck_number(str){ if (str.match(/^[0-9]*$/) == null) { return false; } else { return true; } } function vcheck_numberid(str){ if (str.match(/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|x)$/) == null) { return false; } else { return true; } } function vcheck_email(str){ if (str.match(/^([a-za-z0-9]+[_|\_|\.]?)*[a-za-z0-9]+@([a-za-z0-9]+[_|\_|\.]?)*[a-za-z0-9]+\.[a-za-z]{2,3}$/) == null) { return false; } else { return true; } } function vcheck_code(str){ if (str.match(/^[0-9]\d{5}$/) == null) { return false; } else { return true; } } function vcheck_password(str){ if (str.match(/^\w{6,32}$/) == null) { return false; } else { return true; } } string.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, ""); } string.prototype.ltrim=function(){ return this.replace(/(^\s*)/g,""); } string.prototype.rtrim=function(){ return this.replace(/(\s*$)/g,""); }