Answers for "js modify html element"

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
0

how to change html element in javascript

document.getElementbyid.innerHTML = "text";
Posted by: Guest on February-10-2021

Browse Popular Code Answers by Language