两个字符串完全一样,判断却不相等


console.log("==========================onShow()");

var sectionText = that.data.sectionText;

var sectionText2 = that.data.sectionText2;

console.log(sectionText.constructor); console.log(sectionText2.constructor);

console.log("that.data.sectionText=" + that.data.sectionText);

console.log("that.data.sectionText2=" + that.data.sectionText2);

console.log("that.data.sectionText.length=" + that.data.sectionText.length);

console.log("that.data.sectionText2.length=" + that.data.sectionText2.length);

console.log("that.data.sectionText != that.data.sectionText2=" + that.data.sectionText.trim() != that.data.sectionText2.trim());

console.log("that.data.sectionText == that.data.sectionText2=" + that.data.sectionText == that.data.sectionText2);

console.log("sectionText != sectionText2=" + sectionText != sectionText2);

console.log("encodeURIComponent(sectionText)=" + encodeURIComponent(sectionText));

console.log("encodeURIComponent(sectionText2)=" + encodeURIComponent(sectionText2));

console.log("encodeURIComponent(sectionText) == encodeURIComponent(sectionText2)=" + encodeURIComponent(sectionText) == encodeURIComponent(sectionText2));



house.js? [sm]:113 ==========================onShow()

house.js? [sm]:116 ƒ String() { [native code] }

house.js? [sm]:116 ƒ String() { [native code] }

house.js? [sm]:117 that.data.sectionText=碧桂园

house.js? [sm]:118 that.data.sectionText2=碧桂园

house.js? [sm]:119 that.data.sectionText.length=3

house.js? [sm]:120 that.data.sectionText2.length=3

house.js? [sm]:121 true

house.js? [sm]:122 false

house.js? [sm]:123 true

house.js? [sm]:124 encodeURIComponent(sectionText)=%E7%A2%A7%E6%A1%82%E5%9B%AD

house.js? [sm]:125 encodeURIComponent(sectionText2)=%E7%A2%A7%E6%A1%82%E5%9B%AD

house.js? [sm]:126 false

house.js? [sm]:130 true


展开全部
收起
0回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部