Answers for "getelementbyid replace text"

7

javascript set text of div

document.getElementById("content").innerHTML = "whatever";
Posted by: Guest on January-17-2020
0

javascript replace text within dom

document.body.innerHTML = document.body.innerHTML.replace('hello', 'hi');
Posted by: Guest on July-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language