js 中获取元素内容和显示的不一样。
console.log(this.children(this.children(item.parentElement,'item-detail')[0],'item-count')[0])
console.log(this.children(this.children(item.parentElement,'item-detail')[0],'item-count')[0].innerHTML);
js 中获取元素内容和显示的不一样。
console.log(this.children(this.children(item.parentElement,'item-detail')[0],'item-count')[0])
console.log(this.children(this.children(item.parentElement,'item-detail')[0],'item-count')[0].innerHTML);
13 回答13k 阅读
7 回答2.1k 阅读
3 回答1.3k 阅读✓ 已解决
6 回答1.2k 阅读✓ 已解决
2 回答1.4k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
6 回答1.1k 阅读
我知道了,你在console.log后又改了元素的值,所以console.log元素的话,会显示修改后的元素
https://jsfiddle.net/2s66wh6t/1/