function containSpecial( s ) { var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#) (\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=) (\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/) (\<)(\>)(\?)(\)]+/); return ( containSpecial.test(s) ); }
2013年8月16日 星期五
Home »
JavaScript
» Javascript 判斷字串是否包含特殊字元
Javascript 判斷字串是否包含特殊字元
判斷字元中是否包含有特殊字元:
0 意見:
張貼留言