Answers for "javascript set element text"

0

set text of dom element

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

javascript element edit text

// example:
document.querySelector(`.message`).textContent = `New Message`;

// syntax:
// document.querySelector(`.<class-name>`).textContent = `<new-value>`;
Posted by: Guest on December-08-2020

Code answers related to "javascript set element text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language