{"id":739,"date":"2012-08-16T11:07:04","date_gmt":"2012-08-16T03:07:04","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=739"},"modified":"2012-08-16T11:07:04","modified_gmt":"2012-08-16T03:07:04","slug":"javascript%e6%a3%80%e6%b5%8b%e5%87%bd%e6%95%b0-%e5%ad%97%e7%ac%a6%e9%95%bf%e5%ba%a6","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/739","title":{"rendered":"javascript\u68c0\u6d4b\u51fd\u6570-\u5b57\u7b26\u957f\u5ea6"},"content":{"rendered":"
\n\n\/\/\u00a0Function\u00a0Name:\u00a0trim \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u9996\u5c3e\u7684\u7a7a\u683c \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a015:30 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.trim=function(){ \u00a0\u00a0<\/li>\n return\u00a0this.replace(\/(^\\s*)|(\\s*$)\/g,\u00a0“”); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0ltrim \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u5de6\u4fa7\u7684\u7a7a\u683c \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:58 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.ltrim=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n return\u00a0this.replace(\/(^\\s*)\/g,\u00a0“”); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0rtrim \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u53f3\u4fa7\u7684\u7a7a\u683c \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a015:31 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.rtrim=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n return\u00a0this.replace(\/(\\s*$)\/g,\u00a0“”); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0len \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u8fd4\u56de\u5b57\u7b26\u4e32\u7684\u5b9e\u9645\u957f\u5ea6,\u00a0\u4e00\u4e2a\u6c49\u5b57\u7b972\u4e2a\u957f\u5ea6 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:58 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.len=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0str=this; \u00a0\u00a0<\/li>\n return\u00a0str.replace(\/[^\\x00-\\xff]\/g,\u00a0“**”).length \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidDate \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u6709\u6548\u7684\u77ed\u65e5\u671f\u683c\u5f0f\u00a0–\u00a0“YYYY-MM-DD” \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:58 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidDate=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^(\\d{1,4})(-|\\\/)(\\d{1,2})\\2(\\d{1,2})$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n var\u00a0d=new\u00a0Date(result[1],\u00a0result[3]-1,\u00a0result[4]); \u00a0\u00a0<\/li>\n return\u00a0(d.getFullYear()==result[1]&&d.getMonth()+1==result[3]&&d.getDate()==result[4]); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidTime \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u6709\u6548\u7684\u65f6\u95f4\u683c\u5f0f\u00a0–\u00a0“HH:MM:SS” \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:58 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidTime=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0resule=this.match(\/^(\\d{1,2})(:)?(\\d{1,2})\\2(\\d{1,2})$\/); \u00a0\u00a0<\/li>\n if\u00a0(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n if\u00a0(result[1]>24\u00a0||\u00a0result[3]>60\u00a0||\u00a0result[4]>60)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidEmail \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u6709\u6548\u7684\u7535\u5b50\u90ae\u4ef6 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:59 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidEmail=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidDatetime \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u6709\u6548\u7684\u957f\u65e5\u671f\u683c\u5f0f\u00a0–\u00a0“YYYY-MM-DD\u00a0HH:MM:SS” \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a09:59 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidDatetime=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^(\\d{1,4})(-|\\\/)(\\d{1,2})\\2(\\d{1,2})\u00a0(\\d{1,2}):(\\d{1,2}):(\\d{1,2})$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n var\u00a0d=\u00a0new\u00a0Date(result[1],\u00a0result[3]-1,\u00a0result[4],\u00a0result[5],\u00a0result[6],\u00a0result[7]); \u00a0\u00a0<\/li>\n return\u00a0(d.getFullYear()==result[1]&&(d.getMonth()+1)==result[3]&&d.getDate()==result[4]&&d.getHours()==result[5]&&d.getMinutes()==result[6]&&d.getSeconds()==result[7]); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidInteger \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6574\u6570 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:01 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidInteger=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^(-|\\+)?\\d+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidPositiveInteger \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6b63\u6574\u6570 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:01 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidPositiveInteger=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^\\d+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n if(parseInt(this)>0)\u00a0return\u00a0true; \u00a0\u00a0<\/li>\n return\u00a0false; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidNegativeInteger \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u8d1f\u6574\u6570 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:28 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidNegativeInteger=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^-\\d+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidNumber \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6570\u5b57 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:01 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidNumber=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n return\u00a0!isNaN(this); \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidLetters \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u7531\u00a0A-Z\u00a0\/\u00a0a-z\u00a0\u7ec4\u6210\u7684\u5b57\u7b26\u4e32 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:10 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidLetters=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^[a-zA-Z]+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidDigits \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u7531\u00a00-9\u00a0\u7ec4\u6210\u7684\u6570\u5b57 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:10 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidDigits=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^[1-9][0-9]+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidAlphanumeric \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u7531\u00a00-9\u00a0\/\u00a0A-Z\u00a0\/\u00a0a-z\u00a0\u7ec4\u6210\u7684\u5b57\u7b26\u4e32 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:14 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidAlphanumeric=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^[a-zA-Z0-9]+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidString \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u7531\u00a00-9\u00a0\/\u00a0A-Z\u00a0\/\u00a0a-z\u00a0\/\u00a0.\u00a0\/\u00a0_\u00a0\u7ec4\u6210\u7684\u5b57\u7b26\u4e32 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:20 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidString=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/^[a-zA-Z0-9\\s.\\-_]+$\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidPostalcode \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6709\u6548\u7684\u90ae\u653f\u7f16\u7801 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:22 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidPostalcode=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/(^[0-9]{6}$)\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidPhoneNo \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6709\u6548\u7684\u7535\u8bdd\u53f7\u7801 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:22 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidPhoneNo=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/(^[0-9]{3,4}\\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\\([0-9]{3,4}\\)[0-9]{3,8}$)\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n } \u00a0\u00a0<\/li>\n \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Name:\u00a0isValidMobileNo \u00a0\u00a0<\/li>\n \/\/\u00a0Function\u00a0Description:\u00a0\u5224\u65ad\u8f93\u5165\u662f\u5426\u662f\u4e00\u4e2a\u6709\u6548\u7684\u624b\u673a\u53f7\u7801 \u00a0\u00a0<\/li>\n \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a010:23 \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0<\/li>\n \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0<\/li>\n String.prototype.isValidMobileNo=function() \u00a0\u00a0<\/li>\n { \u00a0\u00a0<\/li>\n var\u00a0result=this.match(\/(^0{0,1}13[0-9]{9}$)\/); \u00a0\u00a0<\/li>\n if(result==null)\u00a0return\u00a0false; \u00a0\u00a0<\/li>\n return\u00a0true; \u00a0\u00a0<\/li>\n }<\/li>\n<\/ul>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":" \/\/\u00a0Function\u00a0Name:\u00a0trim \u00a0\u00a0 \/\/\u00a0Function\u00a0Description:\u00a0\u53bb\u9664\u5b57\u7b26\u4e32\u7684\u9996\u5c3e\u7684\u7a7a\u683c \u00a0\u00a0 \/\/\u00a0Creation\u00a0Date:\u00a02004-7-13\u00a015:30 \u00a0\u00a0 \/\/\u00a0Last\u00a0Modify\u00a0By:\u00a0N\/A \u00a0\u00a0 \/\/\u00a0Last\u00a0Modify\u00a0Date:\u00a0N\/A \u00a0\u00a0 String.prototype.trim=function(){ \u00a0\u00a0 return\u00a0this.replace(\/(^\\s*)|(\\s*$)\/g,\u00a0“”); \u00a0\u00a0 } \u00a0\u00a0 \u00a0\u00a0 \/\/\u00a0Function\u00a0Name:\u00a0ltrim \u00a0\u00a0 \/\/\u00a0Function\u00a0D<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/739"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=739"}],"version-history":[{"count":2,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/739\/revisions"}],"predecessor-version":[{"id":741,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/739\/revisions\/741"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=739"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}