Answers for "what is the purpose of innerhtml in javascript"

28

.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
5

js innerHTML

document.getElementById("Test").innerHTML = "<p style='color:red;'>Test</p>";
Posted by: Guest on December-04-2020

Code answers related to "what is the purpose of innerhtml in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language