Link : HTMLElement

A hypertext link.

Browser/User Agent Support

IEMozillaNetscapeOperaSafari
4.0+1.0+6.0+7.0+1.0+

Constructors

ConstructorIEMozillaNetscapeOperaSafari
Creates a new instance of a Link object.
4.0+1.0+6.0+7.0+1.0+
 

Properties

PropertyIEMozillaNetscapeOperaSafari
Event handler for when a user clicks on the link.
4.0+1.0+6.0+7.0+1.0+
 
Event handler for when a user moves the mouse off of the link.
4.0+1.0+6.0+7.0+1.0+
 
Event handler for when a user moves the mouse over the link.
4.0+1.0+6.0+7.0+1.0+
 
Window to display the contents of the link.
4.0+1.0+6.0+7.0+1.0+
 
Anchor portion of the URL of the link.
4.0+1.0+6.0+nono
 
Host name and port of the URL of the link.
4.0+1.0+6.0+nono
 
Host name of the URL of the link.
4.0+1.0+6.0+nono
 
Complete text of the URL of the link.
3.0+1.0+2.0+7.0+1.0+
 
Path name portion of the URL of the link. (e.g. "/docs/index.html")
4.0+1.0+6.0+nono
 
Port portion of the URL of the link.
4.0+1.0+6.0+nono
 
Protocol portion of the URL of the link. ("http" or "https")
4.0+1.0+6.0+nono
 
Query string portion of the URL of the link.
4.0+1.0+6.0+nono
 
Text between the <a> and </a> tags.
3.0+1.0+2.0+nono
 

References

Anchor | Location | HTMLAnchorElement

Availability

JavaScript 1.0 | enhanced in JavaScript 1.1 | W3C

Constructor Detail

Link Link()

Creates a new instance of a Link object.

Visibility
internal

Property Detail

Function onclick

Event handler for when a user clicks on the link.

See Also

EventListener | EventTarget | MouseEvent

Availability

JavaScript 1.0 | enhanced in JavaScript 1.1

Function onmouseout

Event handler for when a user moves the mouse off of the link.

See Also

EventListener | EventTarget | MouseEvent

Availability

JavaScript 1.1

Function onmouseover

Event handler for when a user moves the mouse over the link.

See Also

EventListener | EventTarget | MouseEvent

Availability

JavaScript 1.0

Object target

Window to display the contents of the link.

See Also

Form.target

Availability

JavaScript 1.0 | W3C

String hash

Anchor portion of the URL of the link.

String host

Host name and port of the URL of the link.

String hostname

Host name of the URL of the link.

String href

Complete text of the URL of the link.

Availability

W3C

String pathname

Path name portion of the URL of the link. (e.g. "/docs/index.html")

String port

Port portion of the URL of the link.

String protocol

Protocol portion of the URL of the link. ("http" or "https")

String search

Query string portion of the URL of the link.

String text

Text between the <a> and </a> tags.