js 移除字符串中的中文

来源:互联网 发布:免费网络课程 编辑:程序博客网 时间:2024/05/23 11:20
var reg =/[\u4e00-\u9fa5]/g;var str = "abc中文";alert(str.replace(reg, ""));

原创粉丝点击