A XHTML Element
The A element designates the start or destination of a hypertext link. This is an inline element and requires a closing tag.
Note Windows Mobile-based Smartphones do not support frames.
Using this Element
There are some common properties and collections that apply to all the elements of the document object model, see Common Properties for All DOM Elements in Internet Explorer Mobile.
This element can be used within a web page with attributes.
This element can be used within scripts where it will have properties, events and methods.
Attributes
Attribute | Value | PPC | SP | Description |
---|---|---|---|---|
ACCESSKEY | 0...9, #, * | Yes | Yes | Gives access or focus to an active HTML element by using a keypad number.
Note For Pocket PCs, supported only for devices running Windows Mobile 2003 software or later. |
CLASS | Yes | Yes | Associates the element with a cascading style sheet (CSS) style.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
HREF | URL | Yes | Yes | A string that specifies a destination URL or anchor point — for example, #bookmark, mailto:, or tel. |
# | Yes | Yes | Links to a named anchor point in the document. | |
mailto: | Yes | Yes | Starts or uses the default mail client to send email to the specified. | |
tel: | Yes | Yes | ||
wtai: | Yes | Yes | ||
ID | Yes | Yes | Uniquely identifies the element within a document.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
NAME | String | Yes | Yes | Specifies a name or bookmark for the current section of the document. |
ONCLICK | Yes | Yes | Event that occurs when the user chooses the A element.
Note For PocketPCs, supported only for devices running Pocket PC 2002 software or later. |
|
STYLE | Yes | Yes | Provides the definition of the CSS styles used for this element.
Note Supported only for devices running Windows Mobile 2003 software or later. |
|
TABINDEX | Number | Yes | Yes | Sets the order in which elements are tabbed to.
Note Supported only for devices running Windows Mobile 2003 software or later. |
TARGET | _blank | Yes | Yes | Causes Internet Explorer Mobile to navigate the topmost document to the HREF.
Note The TARGET element is not supported for Windows Mobile-based Smartphones. |
_parent | Yes | Yes | Causes the immediate parent of the frame to navigate to the HREF.
Note The TARGET element is not supported for Windows Mobile-based Smartphones. |
|
_self | Yes | Yes | Causes the current window or frame to navigate to the HREF. This is the same as not using the TARGET attribute.
Note The TARGET element is not supported for Windows Mobile-based Smartphones. |
|
_top | Yes | No* | Causes Internet Explorer Mobile to navigate the topmost document to the HREF.
Note The TARGET element is not supported for Windows Mobile-based Smartphones. |
Scripting Properties
Property | Type | Access | Comments |
---|---|---|---|
accessKey | string | read/write | |
hash | string | read/write | Sets or retrieves the part of the HREF after the "#" mark character. |
host | string | read/write | |
hostname | string | read/write | Sets or retrieves the host name part of the location of the page. This does not include the port number. |
href | string | read/write | Sets or retrieves the destination URL or anchor point. |
name | string | read/write | |
pathname | string | read/write | Sets or retrieves the file name or path of the location of the page. This always begins with a "/" character. |
port | string | read/write | Sets or retrieves the port number associated with the URL. If the port number is not included on the URL, it will not be added. Similarly, if it exists, it will not be removed even if it is :80. |
protocol | string | read/write | Sets or retrieves the protocol portion of the URL. It returns the initial substring of a URL including the colon. |
search | string | read/write | Sets or retrieves the search (query) string portion of the href. This includes the leading question mark. |
target | string | read/write | Sets or retrieves the target of the href. |
Scripting Events
Event | Supported | Comment |
---|---|---|
onclick | Yes | This event fires when the user taps on the <A> element. Note the event only fires if the user does a pen down while on the <A> and a pen up without moving >5 pixels away from pen down. The author can specify special handler for this event. |
Scripting Methods
Method | Support |
---|---|
blur | Yes |
click | Yes |
focus | Yes |
Requirements
Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later
See Also
Send Feedback on this topic to the authors