/**
* 判断字符串是否包含中文
*/
function checkStringIsChinese(str) {
var pattern = new RegExp("[\u4E00-\u9FA5]+");
if (pattern.test(str)) {
return true;
}
return false;
}
原文:https://www.cnblogs.com/WebLinuxStudy/p/13813672.html