JavaScript link Objects - Properties
Description
JavaScript link object refers to an html link (i.e. a text, an image or an area of an image which when clicked, takes you to another document or another section of the same document).
Can be created using html a tag or by html area tag or by calling string.link method in javascript.
Can be accessed by document.links[] array, where document.links[0] referes to the first link of an html page.
Javascript Anchor Objects Property
| Name | Description | Version |
|---|---|---|
| hash | Specifies an anchor name starting with a hash mark (#) in the URL. | Implemented in JavaScript 1.0 |
| host | Specifies the server name, subdomain and domain name. | Implemented in JavaScript 1.0 |
| hostname | Specifies the full hostname of the server containing server name, subdomain and domain name. | Implemented in JavaScript 1.0 |
| href | Specifies the entire URL. | Implemented in JavaScript 1.0 |
| pathname | Specifies the URL-path portion of the URL. | Implemented in JavaScript 1.0 |
| port | Specifies the communications port that the server uses. | Implemented in JavaScript 1.0 |
| protocol | Specifies the beginning of the URL, including the colon. | Implemented in JavaScript 1.0 |
| search | Specifies a query string starting with ? character. | Implemented in JavaScript 1.0 |
| target | Reflects the target attribute. | Implemented in JavaScript 1.0 |
| text | A string containing the content of the corresponding a tag. | Implemented in JavaScript 1.2 |
See also :

