particular element setattribute javascript on change code example Example: set attribute javascript Element.setAttribute(name, value);