javascript how to set attributes code example
Example: javascript change attribute
var element = document.getElementById("elemId");
element.setAttribute("attributeName", "value");
var element = document.getElementById("elemId");
element.setAttribute("attributeName", "value");