var chineseArr = ['腾讯', '阿里', '华为', '百度', 'Goolge', 'AHHH'];
var newChineseArr = chineseArr.sort(function (a, b) {
return a.localeCompare(b, 'zh-Hans-CN', {sensitivity: 'accent'});
});
console.log(newChineseArr);
在Chrome 和Firefox 下输出 阿里, 百度, 华为, 腾讯, AHHH, Goolge,
在IE下输出 AHHH, Goolge,阿里, 百度, 华为, 腾讯
求怎么兼容 ? 主要是zh-Hans-CN 的问题
让后端处理啊,给每个信息加个排序字段,然后查的时候按排序字段查就可以了