Answers for "js assign attribute"

21

javascript change attribute

var element = document.getElementById("elemId");
element.setAttribute("attributeName", "value");
Posted by: Guest on June-03-2020
13

javascript add attribute

var element = document.getElementById('btnBuild');
element.setAttribute("disabled", "disabled");
Posted by: Guest on June-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language