hasAttributes

Summary

hasAttributes returns a boolean value of true or false, indicating if the current element has any attributes or not.

Syntax

result = targetNode.hasAttributes();

Examples

var t1 = document.getElementById("table-data"); 

if ( t1.hasAttributes() ) { 
  // do something with 
  // t1.attributes
}

Specification

See also

Document Tags and Contributors

 Contributors to this page: Dria
 Last updated by: Dria,