Answers for "js set innner text"

7

settext javascript

document.getElementById("myBtn").textContent = 'Hello World';
// OR
document.getElementById("p1").innerHTML = "New text!";
Posted by: Guest on August-28-2021
2

change innertext javascript

element.innerText = "Hello World";
Posted by: Guest on June-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language