Help Center

Local Navigation

Object: HTMLAnchorElement

Availability

BlackBerry® Device Software version 4.6 or later

Extends

HTMLElement

The HTMLAnchorElement object represents an <a> element in an HTML document.

The <a> element defines an anchor, which can be used to create a link to another document, or to create a bookmark within the current document.

HTMLAnchorElement properties

Property name

Type

Description

Status

Support level

Availability

accessKey

DOMString

Specifies the keypad key that gives access to the element.

writable

DOM 2 HTML

4.6 or later

charset

DOMString

Specifies the character encoding used in the referenced document; the value must be the name of a standard character set.

writable

DOM 2 HTML

4.6 or later

coords

DOMString

Specifies a comma-separated list of the coordinates of HTMLAnchorElement.shape, which defines the active region in an image map.

writable

DOM 2 HTML

4.6 or later

href

DOMString

Specifies the URI of the target of the link.

writable

DOM 2 HTML

4.6 or later

hreflang

DOMString

Specifies the language code of the target resource.

writable

DOM 2 HTML

4.6 or later

name

DOMString

Specifies a name for the anchor.

writable

DOM 2 HTML

4.6 or later

rel

DOMString

Specifies the link type between the current document and the referenced resource.

writable

DOM 2 HTML

4.6 or later

rev

DOMString

Specifies the link type between the referenced resource and the current document.

writable

DOM 2 HTML

4.6 or later

shape

DOMString

Specifies the shape of an active region in an image map. The coordinates of the shape are specified by HTMLAnchorElement.coords.

writable

DOM 2 HTML

4.6 or later

tabIndex

int

Specifies the element’s position in the tabbing order.

writable

DOM 2 HTML

4.6 or later

target

DOMString

Specifies the frame in which to render the target document.

writable

DOM 2 HTML

4.6 or later

type

DOMString

Specifies the MIME type of the target document.

writable

DOM 2 HTML

4.6 or later

HTMLAnchorElement methods

Method name

Description

Support level

Availability

blur()

Removes keypad focus from the element.

DOM 2 HTML

4.6 or later

focus()

Gives keypad focus to the element.

DOM 2 HTML

4.6 or later

Previous topic: HTML API

Was this information helpful? Send us your comments.