// 保留中文
this.getCN = function (v) {
if (typeof (v) == 'string') {
var regEx = /[^\u4e00-\u9fa5\uf900-\ufa2d]/g;
return v.replace(regEx, '');
}
};
想用更多的方法请打开JavaScript基础包
// 保留中文
this.getCN = function (v) {
if (typeof (v) == 'string') {
var regEx = /[^\u4e00-\u9fa5\uf900-\ufa2d]/g;
return v.replace(regEx, '');
}
};
想用更多的方法请打开JavaScript基础包
转载于:https://my.oschina.net/u/3875237/blog/3021043