Functiondojo.hasAttr

<script src="../../js/dojo.js"></script>
defined in dojo/_base/html.js

Returns true if the requested attribute is specified on the given element, and false otherwise.

Usage

function (/*DomNode|String*/ node, /*String*/ name) (view source)
parametertypedescription
nodeDomNode|Stringid or reference to the element to check
nameStringthe name of the attribute