[Solved] Adding content to HTML tag [closed]

[ad_1]

You can simply fetch the innerText and update with new value:

document.getElementById("myContent").innerText = document.getElementById("myContent").innerText + " is now changed";
<p id="myContent">some content</p>

1

[ad_2]

solved Adding content to HTML

tag [closed]