Note: This method adds an attribute node to the element. Syntax: document.getElementById("elementID").setAttributeNode(param1) document.all.elementID.setAttributeNode(param1) // IE only Parameters: param1 Required; the name of the attribute to be added.