DOM Anchor Object
The Anchor object represents an HTML hyperlink.
For each <a>
tag in an HTML document, an Anchor object is created.
The Anchor object can be accessed by using getElementById(), or by searching through the anchors[] array of the Document object.
Properties
Property | Description |
---|---|
charset | Sets or returns the value of the charset attribute of a link |
href | Sets or returns the value of the href attribute of a link |
hreflang | Sets or returns the value of the hreflang attribute of a link |
name | Sets or returns the value of the name attribute of a link |
rel | Sets or returns the value of the rel attribute of a link |
rev | Sets or returns the value of the rev attribute of a link |
target | Sets or returns the value of the target attribute of a link |
type | Sets or returns the value of the type attribute of a link |
Standard Properties and Methods
This object also supports the standard properties and methods.
Standard Events
This object also supports the standard events.