getAttribute (DOMElement - JavaScript) Gets the attribute for this element with the given name. Defined inDOMElement SyntaxgetAttribute(name:string) : string