Answers for "set the text content of an element js"

9

javascript set text of div

document.getElementById("content").innerHTML = "whatever";
Posted by: Guest on January-17-2020
0

how to change textContent in js

Get the text content of an element: var x = document. getElementById("myBtn"). ...
Change the textual content of a <p> element with id="demo": getElementById("demo"). textContent = "Paragraph changed!";
Get all the textual content of an <ul> element with id="myList": getElementById("myList").
Posted by: Guest on December-13-2021

Code answers related to "set the text content of an element js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language