HTML and CSS Reference
In-Depth Information
A links object contains a URL, similar to the window's location object, and shares the
same properties. A full URL takes the following form:
<protocol>//<host>[:<port>]/<pathname>[<hash>][<search>]
There are nine events that can be triggered by a link: onClick, onDblClick, onKey-
Down, onKeyPress, onKeyUp, onMouseDown, onMouseUp, onMouseOver , and onMouse-
Out . (For details, see Chapter 13.)
Table 12.3 Properties of the W3C links Object
Property
What It Describes
charset
Sets or returns the character encoding of the target URL.
disabled
Sets or returns whether or not the target URL should be disabled.
href
The entire URL.
hreflang
Sets or returns the base language of the target URL.
id
Sets or returns the id of a <link> element.
media
Sets or returns on what device the document will be displayed.
name
The name of the <link> element.
rel
Sets or returns the relationship between the current document and the
target URL.
rev
Sets or returns the relationship between the target URL and the current
document.
Table 12.4 Properties of the JavaScript links Object
Property
What It Describes
hash
The anchor part of the URL (if any).
host
The hostname port part of the URL.
hostname
The hostname part of the URL.
href
The entire URL.
pathname
The pathname part of the URL.
port
The port part of the URL.
Continues
 
Search WWH ::




Custom Search