标签:
判断字符中是否包含有特殊字符:
function containSpecial( s ) {
var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#)(\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\‘)(\")(\,)(\.)(\/)(\<)(\>)(\?)(\)]+/);
return ( containSpecial.test(s) );
}
标签:
原文地址:http://www.cnblogs.com/smght/p/5888208.html