Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add more text to element

document.getElementById("p").textContent += " This is the text from javascript.";

<p id ="p">This is the text from HTML.</p>
 
PREVIOUS NEXT
Tagged: #js #add #text #element
ADD COMMENT
Topic
Name
8+7 =