Share via


A XHTML Element (Windows Embedded CE 6.0)

1/6/2010

The A element 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.

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

The following table shows items that Internet Explorer Embedded 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.

Ee487792.note(en-US,WinEmbedded.60).gifNote:
Not all devices will support this feature.

NAME

String

Specifies a name or bookmark for the current section of the document.

ONCLICK

 

Event that occurs when the user chooses the A element.

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 Embedded 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 TARGET attribute.

Scripting Properties

The following table shows items that Internet Explorer Embedded 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 Embedded 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 Embedded supports.

Method Comments

blur

Syntax:

link.blur()

click

Syntax:

link.click()

focus

Syntax:

link.focus()

  • Gives selection focus to the link.

getAttribute

Syntax:

vAttrValue=link.getAttribute(sAttrName[,iFlags])

  • Returns the value of the specified attribute. If the attribute is not present then a NULL is returned.
    • sAttrName is a String containing the name of the attribute.
    • iFlags is an integer that specifies one or more of the following:
      0 (Default) Performs a property search that is not case-sensitive, and returns an interpolated value if the property is found.
      1 Performs a case-sensitive property search. To find a match, the uppercase and lowercase letters in sAttrName must exactly match those in the attribute name.
      2 Returns the value exactly as it was set in script or in the source document.

Requirements

Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Concepts

Internet Explorer Embedded HTML Elements