loading...

How to add text to an HTML element with JS

alexandrefreire profile image Alexandre Freire ・1 min read

In this example, we will change the text in the 'th' element

...
<th id="dt_emissao"></th>
...
var dt_emissao = document.getElementById("dt_emissao");
dt_emissao.textContent = "Example";

Discussion

markdown guide