Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The Aelement designates the start or destination of a hypertext link. This is an inline element and requires a closing tag. It is also referred to as the scripting object link.
Using this Element
There are some common properties and collections that apply to all the elements of the document object model, see Common Properties, Methods and Collections for the HTML 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, eventsand methods.
Attributes
The following table shows items that Internet Explorer Mobile supports.
Attribute | Value | Description | ||
---|---|---|---|---|
ACCESSKEY |
0...9, #, * |
Gives access or focus to an active HTML element by using a keypad number.
|
||
CLASS |
|
Associates the element with a cascading style sheet (CSS) style.
|
||
HREF |
URL |
A string that specifies a destination URL or anchor point — for example, #bookmark, mailto:, or tel. |
||
|
# |
Links to a named anchor point in the document. |
||
|
mailto: |
Starts or uses the default mail client to send e-mail to the specified. |
||
|
tel: |
|
||
|
wtai: |
|
||
ID |
|
Uniquely identifies the element within a document.
|
||
MEMORYNAME |
String |
If the HREF value is either a mailto: or tel:, then this will be assumed to be a name. The name format can have a hyphen to separate two parts of the name. If present, this name will be stored in the contacts list when this link is selected.
|
||
NAME |
String |
Specifies a name or bookmark for the current section of the document. |
||
ONCLICK |
|
Event that occurs when the user chooses the Aelement.
|
||
STYLE |
|
Provides the definition of the CSS styles used for this element.
|
||
TABINDEX |
Number |
Sets the order in which elements are tabbed to.
|
||
TARGET |
|
|
||
TARGET |
_blank |
Causes Internet Explorer Mobile to navigate the topmost document to the HREF. |
||
|
_parent |
Causes the immediate parent of the frame to navigate to the HREF. |
||
|
_self |
Causes the current window or frame to navigate to the HREF. This is the same as not using the TARGETattribute. |
||
|
_top |
Causes Internet Explorer Mobile to navigate the topmost document to the HREF.
|
Scripting Properties
The following table shows items that Internet Explorer Mobile supports.
Property | Type | Access | Comments | ||
---|---|---|---|---|---|
accessKey |
string |
Read/Write |
Sets or retrieves the number associated with the accesskey attribute.
|
||
hash |
string |
Read/Write |
Sets or retrieves the part of the HREF after the "#" mark character. |
||
host |
string |
Read/Write |
Sets or retrieves the hostname of the location of page. |
||
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 |
Sets or retrieves the anchor bookmark name.
|
||
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. The default values are 21 for File Transfer Protocol (FTP), 70 for the Gopher protocol, 80 for HTTP, and 443 for HTTP Secure (HTTPS). |
||
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
The following table shows items that Internet Explorer Mobile supports.
Event | Comment | ||
---|---|---|---|
onblur |
|
||
onclick |
This event fires when the user taps on the <A> element.
|
||
onfocus |
|
Scripting Methods
The following table shows items that Internet Explorer Mobile supports.
Method | Comments | ||
---|---|---|---|
blur |
Syntax:
|
||
click |
Syntax:
|
||
focus |
Syntax:
|
||
getAttribute |
Syntax:
|
Requirements
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |