Answers for "how to change the value of an attribute in javascript"

2

html change attribute

element.setAttribute(name, value);


var d = document.getElementById("d1"); 
d.setAttribute("align", "center");
Posted by: Guest on July-21-2020
14

set attribute javascript

Element.setAttribute(name, value);
Posted by: Guest on March-02-2020
0

Javascript changing the attribute

document.getElementById("demo").innerHTML = "Hello JavaScript";
Posted by: Guest on October-06-2021

Code answers related to "how to change the value of an attribute in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language