字符串比较明明一样为什么返回false , 见代码。
屏幕快照 2016年08月12日 13.53.10.png
8 回复
可以试一下如下代码,看看他们每个字符是否一样。
for (var index = 0; index < maccode.length; ++index) {
console.log("char " + index + ": " + maccode.charCodeAt(index));
}
for (var index = 0; index < softcode.length; ++index) {
console.log("char " + index + ": " + softcode.charCodeAt(index));
}