hasAttribute :: Element

hasAttribute(element, attribute) -> Boolean

 

Simulates the standard compliant DOM method hasAttribute for browsers missing it (Internet Explorer 6 and 7).

 

Example

 

<a id="link" href="http://prototypejs.org">Prototype</a>

 

$('link').hasAttribute('href');

// -> true

 


Prototype API 1.5.0 - prototypejs.org