使用如下方法if("中文比较".charCodeAt() == "中文比较".charCodeAt()) //trueif("中文比较".charCodeAt() == "英文比较".charCodeAt()) //false