問題:
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