Platform Support
| IE | Mozilla | Netscape | Opera | Safari | Chrome | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | ||
|---|---|---|---|---|---|---|---|---|---|
|
HTMLAnchorElement Constructor() : HTMLAnchorElement
Anchor or hyperlink in an HTML document.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no | ||
HTMLAnchorElement() : HTMLAnchorElementAnchor or hyperlink in an HTML document. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome |
|---|---|---|---|---|---|---|---|
|
accessKey
: String
Hot-key shortcut for the element.
|
Show Details | 4.0+ | no | no | no | no | no |
|
|||||||
|
charset
: String
Specifies the character set associated with the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
coords
: String
Comma-delimited x, y coordinates for the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
For a databound element, specifies the field supplying the data.
|
No Details | 4.0+ | no | no | no | no | no |
|
|
|||||||
|
disabled
: Boolean
Specifies whether or not the element is disabled.
|
Show Details | 4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
Substring for the URL after the hash (#), if there is one.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
Domain name and port substring for the URL.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
Domain name portion of the URL.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
href
: String
Path or URL for the linked document or object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
hreflang
: String
Language code for the linked document or object.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
media
: String
Media type associated with the element.
|
Show Details | 4.0+ | no | no | no | no | no |
|
|||||||
|
name
: String
Unique name identifier for the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
nameProp
: String
Substring for the URL that contains the file name.
|
Show Details | 4.0+ | no | no | no | no | no |
|
|||||||
|
Path and filename for the URL.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
Substring for the URL that contains the port name.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
Substring for the URL that contains the protocol.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
Full name for the protocol for the URL.
|
No Details | 4.0+ | no | no | no | no | no |
|
|
|||||||
|
rel
: String
Defines the relationship of the linked document to the current document.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
rev
: String
Defines the relationship of the current document to the linked document.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
Substring for the URL that contains the query term (after the question mark).
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|
|||||||
|
shape
: String
Shape of the object.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
tabIndex
: Number
Position of the element in the tabbing order for the document.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
target
: String
Target window to use for opening the linked document.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
text
: String
Text enclosed by the open and close "a" tags.
|
Show Details | no | no | 4.0+ | no | no | no |
|
|||||||
|
type
: String
Specifies the MIME type for the target document or object.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | no |
|
|||||||
|
URN for the target document or object.
|
No Details | 4.0+ | no | no | no | no | no |
|
|
|||||||
|
Horizontal (x) position of the element relative to the left edge of the document.
|
No Details | no | no | 4.0+ | no | no | no |
|
|
|||||||
|
Vertical (y) position of the element relative to the top edge of the document.
|
No Details | no | no | 4.0+ | no | no | no |
|
|
|||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | Chrome | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
blur() : void
Takes focus off of the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no | |||||
|
Returns
|
||||||||||||
|
focus() : void
Gives the element focus.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ | no | |||||
|
Returns
|
||||||||||||
|
handleEvent(Event event) : void
Process the instance of the event.
|
Show Details | no | no | 4.0+ | no | no | no | |||||
|
Parameters
Returns
|
||||||||||||
References
Availability
HTML DOM Level 1|HTML DOM Level 2|W3C