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