问题:
What is the difference between textContent
and innerText
in JavaScript? JavaScript 中的textContent
和innerText
什么区别?
Can I use textContent
as follows:我可以使用textContent
如下:
var logo$ = document.getElementsByClassName('logo')[0];
logo$.textContent = "Example";
解决方案:
参考一: https://stackoom.com/question/2NkXz参考二: Difference between textContent vs innerText