javascript 过滤中文汉字和 过滤中文汉字和中文符号的方法
过滤中文汉字
var hebingdatastr="无法为“
var reg = /[\u4e00-\u9fa5]/g; hebingdatastr = hebingdatastr.replace(reg, "");
过滤汉字和中文符号
var hebingdatastr="ef啦啦,。。d28"; var reg = /[^\x00-\xff]/g; hebingdatastr = hebingdatastr.replace(reg, ""); alert(hebingdatastr);
javascript 过滤中文汉字和 过滤中文汉字和符号的方法
原文:https://www.cnblogs.com/newmiracle/p/12656031.html