What is the difference between textContent
and innerText
in JavaScript?
Can I use textContent
as follows:
var logo$ = document.getElementsByClassName('logo')[0];
logo$.textContent = "Example";
What is the difference between textContent
and innerText
in JavaScript?
Can I use textContent
as follows:
var logo$ = document.getElementsByClassName('logo')[0];
logo$.textContent = "Example";