Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

textcontent javascript

// to change the text displayed by a HTML element, you can access the textContent property
element.textContent = "some text";
// some elements like textareas and inputs have a value instead of textContent
element.value = "some text";
// you can get said element through its id
document.getElementById("element id");
 
PREVIOUS NEXT
Tagged: #textcontent #javascript
ADD COMMENT
Topic
Name
5+9 =