hasAttribute (DOMElement - JavaScript)

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Defined in

DOMElement

Syntax

hasAttribute(name:string) : boolean