Sunday, 8 January 2012

HTML DOM Anchor Object


Anchor Object

The Anchor object represents an HTML hyperlink.
For each <a> tag in an HTML document, an Anchor object is created.
An anchor allows you to create a link to another document (with the href attribute), or to a different point in the same document (with the name attribute).
You can access an anchor by using getElementById(), or by searching through the anchors[] array of the Document object.

Anchor Object Properties

W3C: W3C Standard.
PropertyDescriptionW3C
charsetSets or returns the value of the charset attribute of a linkYes
hrefSets or returns the value of the href attribute of a linkYes
hreflangSets or returns the value of the hreflang attribute of a linkYes
nameSets or returns the value of the name attribute of a linkYes
relSets or returns the value of the rel attribute of a linkYes
revSets or returns the value of the rev attribute of a linkYes
targetSets or returns the value of the target attribute of a linkYes
typeSets or returns the value of the type attribute of a linkYes

Standard Properties, Methods, and Events

No comments:

Post a Comment