Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

append HTML elements in JavaScript

let div = document.createElement("div")
div.append("Some text")

console.log(div.textContent) // "Some text"
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #append #HTML #elements #JavaScript
ADD COMMENT
Topic
Name
4+4 =