Answers for "javascript element edit text"

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
1

change html element

element.innerHTML =  "<p>read this</p>"	Change the inner HTML of an element
element.style.color = "blue";			Change the style of an HTML element
element.setAttribute(important, "true")	Change the attribute value of an HTML element
element.important = "true"				Change the attribute value of an HTML element
Posted by: Guest on November-19-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language