Associatve array containing the attributes of node.
SyntaxNote: This property is read-only.
var result = element.attributes;
Return Value
Returns an object of type
NamedNodeMap that allows to access attributes through their names.
Usage Retrieve a listing of ALL Nodes of an element, including developer defined attributes and data- prefixed attributes.
The depreciated presentational attributes are datafld, datasrc, marginwidth, marginheight, allowtransparency, vspace, hspace, height, width, align, valign, alink, link, vlink, background, bgcolor, color, fgcolor, border, cellpadding, cellspacing, clear, frameborder, nowrap, scrolling
NotesFor backwards compatibility first test if an attribute Node is null. Binary attributes may or may not have a value
Related specificationsMozilla Developer Network : [Node.attributes Article]
Microsoft Developer Network: [attributes Collection Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4