This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

links

Property of dom/Documentdom/Document

Syntax

var result = element.links;
element.links = value;

Examples

This example shows how to display the href of the third link (Microsoft.com) defined in the document.

<a href="http://yahoo.com">Yahoo.com</a>
<a href="http://msn.com">MSN.com</a>
<a href="http://microsoft.com">Microsoft.com</a>
<script>
alert(document.links[2].href);
</script>

Notes

Remarks

For a objects to appear in the collection, they must have an href attribute.

Syntax

Standards information

There are no standards that apply here.

Attributions