Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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").
 
PREVIOUS NEXT
Tagged: #change #textContent #js
ADD COMMENT
Topic
Name
3+8 =