Platform Support
IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
Link Constructor() : Link
Creates a new instance of a Link object.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||
Link() : LinkCreates a new instance of a Link object. Returns
|
Inherited Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
onclick
: Object
Event handler for when a user clicks on the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
ondblclick
: Object
Event handler for when a user double-clicks the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onhelp
: Object
Event handler for when a user requests Help.
|
Show Details | 3.0+ | no | no | no | no |
|
||||||
onkeydown
: Object
Event handler for when a user presses a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeypress
: Object
Event handler for when a user presses and releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onkeyup
: Object
Event handler for when a user releases a key on his or her keyboard.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousedown
: Object
Event handler for when a user clicks the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmousemove
: Object
Event handler for when a user moves the mouse.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseout
: Object
Event handler for when a user moves the mouse off of the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseover
: Object
Event handler for when a user moves the mouse over the element.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseup
: Object
Event handler for when a user releases the mouse button.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
List of all elements within the current element. Behaves similarly to document.all.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
The direct child elements of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
className
: String
The CSS class that the element belongs to.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Reference to the Document object that contains the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
id
: String
Identifier used to assign a unique name to the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Plain text that the element contains. (Does not include opening and closing tags of the element.)
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
lang
: String
lang attribute of the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Height (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetLeft
: Object
Horizontal position (in pixels) of the element relative to the offsetParent container element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
offsetParent
: Object
Container element used as a reference for the offsetLeft and offsetTop elements.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Vertical position (in pixels) of the element relative to the offsetParent container element.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Width (in pixels) of the element and its contents.
|
No Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
HTML text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Plain text that the element contains, including its start and end tags.
|
No Details | 4.0+ | no | no | 7.0+ | no |
|
||||||
Element that is the direct parent of the current element.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Index of the current element in document.all.
|
No Details | 4.0+ | no | no | no | no |
|
||||||
Inline CSS style attributes for the element.
|
No Details | 4.0+ | 1.0+ | 4.0+ | 7.0+ | 1.0+ |
|
||||||
HTML tag name for the element.
|
No Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
title
: String
Title attribute of the HTML tag for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
onclick
: Function
Event handler for when a user clicks on the link.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseout
: Function
Event handler for when a user moves the mouse off of the link.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
onmouseover
: Function
Event handler for when a user moves the mouse over the link.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
target
: Object
Window to display the contents of the link.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Anchor portion of the URL of the link.
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Host name and port of the URL of the link.
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Host name of the URL of the link.
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
href
: String
Complete text of the URL of the link.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
Path name portion of the URL of the link. (e.g. "/docs/index.html")
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Port portion of the URL of the link.
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Protocol portion of the URL of the link. ("http" or "https")
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Query string portion of the URL of the link.
|
No Details | 4.0+ | 1.0+ | 6.0+ | no | no |
|
||||||
Text between the <a> and </a> tags.
|
No Details | 3.0+ | 1.0+ | 2.0+ | no | no |
|
Inherited Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
contains(Object target) : Boolean
Determines whether the current element contains the target HTML element.
|
Show Details | 4.0+ | no | no | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
getAttribute(String name) : String
Gets the value of the specified attribute.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
handleEvent() : Object
Calls the event handler for the specified event.
|
Show Details | no | no | 6.0+ | no | no | ||||||||
Returns
|
||||||||||||||
insertAdjacentHTML(String where, Object text) : void
Inserts HTML text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
insertAdjacentText(String where, Object text) : void
Inserts plain text in the specified location within or next to the element.
|
Show Details | 5.0+ | no | no | 7.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
removeAttribute(String name) : Attribute
Deletes the specified attribute from the element.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
||||||||||||||
scrollIntoView([Boolean top]) : void
Scrolls the current document so that the top of current element is either at the top of the display area, or the bottom of
the element is at the bottom of the display area.
|
Show Details | 4.0+ | 1.0+ | 7.0+ | no | no | ||||||||
Parameters
Returns
|
||||||||||||||
setAttribute(String name, Object value) : Object
Sets the specified attribute to the specified value for the element.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||||||||
Parameters
Returns
|
References
Anchor|Location|HTMLAnchorElement
Availability
JavaScript 1.0|enhanced in JavaScript 1.1|W3C