Answers for "set text of p element js"

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"

Browse Popular Code Answers by Language