JavaScript代码判断输入的字符串是否含有特殊字符和表情代码实例 代码如下:reg=/[~#^$@%&!?%*]/gi;if(reg.test(postdata.Name.trim())){alert("姓名不能含有特殊字符");}els 字符串含有表情