remove attribute javascript code example
Example 1: remove disabled attribute javascript
document.getElementById('my-input-id').disabled = false;
Example 2: remove attribute javascript
document.getElementsByTagName("H1")[0].removeAttribute("class");
Example 3: html how to remove attribute#
element.removeAttribute(attributename)
Example 4: delete attribute javascript
var target = document.getElementById("p12");
target.removeAttribute("class");