Answers for "Set new element's content to the value of the text property of the object"

24

.innerhtml

// .innerHTML method is used to change the html contents of a DOM object
document.getElementById("demo").innerHTML = "Paragraph changed!";
Posted by: Guest on April-26-2020
0

set text of dom element

document.getElementById("myBtn").textContent = 'Hello World';
Posted by: Guest on March-05-2020

Code answers related to "Set new element's content to the value of the text property of the object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language