1.
function containSpecial( s ){
var containSpecial = RegExp(/[(\ )(\~)(\!)(\@)(\#) (\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=) (\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/) (\)(\?)(\)]+/);
return ( containSpecial.test(s) );
}
2。匹配除A-Z a-z 0-9之外所有的符号
.((?=[\x21-\x7e]+)[^A-Za-z0-9])