CodePudding user response:
Var regExp=/^ [\ u4e00 - \ u9fa5] + $/;//\ u4e00 - \ u9fa5 is Chinese characters unicodeIf (STR) match (regExp)) {
$(" p "). The HTML (' check successful Chinese characters');
} else {
$(" p "). The HTML (included in the 'input of Chinese characters');
}
//if not, try this [^] [\ u4e00 - \ u9fa5] * *
CodePudding user response:
https://blog.csdn.net/weixin_40687883/article/details/81187797