ANN n/a   IE 4   DOM 1

The A object reflects the A element, regardless of whether the element is set up to be an anchor, link, or both. Navigator and Internet Explorer both treat this object as a member of the links[] and/or anchors[] arrays of a document. Internet Explorer 4 also lets you reference the object as a member of the document.all[] collection (array of all HTML elements).

 
HTML Equivalent
<A>
 
Object Model Reference
NN [window.]document.links[i]
[window.]document.anchors[i]
IE [window.]document.links[i]
[window.]document.anchors[i]
[window.]document.all.elementID
accessKeyNN n/a   IE 4   DOM 1
 Read/Write
 

A single character key that either brings focus to an element or, in the case of an A element (as a link), follows the link. The browser and operating system determine whether the user must press a modifier key (e.g., Ctrl, Alt, or Command) with the access key to activate the link. In IE 4/Windows, the Alt key is required, and the key is not case sensitive. Not working in IE 4/Mac.

 
Example
document.links[3].accessKey = "n"
 
Value
Single alphanumeric (and punctuation) keyboard character.
 
Default None.
dataFldNN n/a   IE 4   DOM n/a
 Read/Write
 

Used with IE 4 data binding to associate a remote data source column value in lieu of an HREF attribute for a link. The DATASRC attribute must also be set for the element. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source.

 
Example
document.all.hotlink.dataFld = "linkURL"
 
Value
Case-sensitive identifier of the data source column.
 
Default None.
dataSrcNN n/a   IE 4   DOM n/a
 Read/Write
 

Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Setting both the dataFld and dataSrc properties to empty strings breaks the binding between element and data source.

 
Example
document.all.hotlink.dataSrc = "#DBSRC3"
 
Value
Case-sensitive identifier of the data source.
 
Default None.
hashNN 2   IE 3   DOM 1
 Read/Write
 

That portion of the HREF attribute's URL following the # symbol, referring to an anchor location in a document. Do not include the # symbol when setting the property.

 
Example
document.all.myLink.hash = "section3"
document.links[2].hash = "section3"
 
Value
String.
 
Default None.
hostNN 2   IE 3   DOM 1
 Read/Write
 

The combination of the hostname and port (if any) of the server of the destination document for the link. If the port is explicitly part of the URL, the hostname and port are separated by a colon, just as they are in the URL. If the port number is not specified in an HTTP URL for IE 4, it automatically returns the default, port 80.

 
Example
document.all.myLink.host = "www.megacorp.com:80"
document.links[2].host = "www.megacorp.com:80"
 
Value
String of hostname optionally followed by a colon and port number.
 
Default Depends on server.
hostnameNN 2   IE 3   DOM 1
 Read/Write
 

The hostname of the server (i.e., a "two-dot" address consisting of server name and domain) of the destination document for the link. The hostname property does not include the port number.

 
Example
document.all.myLink.hostname = "www.megacorp.com"
document.links[2].hostname = "www.megacorp.com"
 
Value
String of host name (server and domain).
 
Default Depends on server.
hrefNN 2   IE 3   DOM 1
 Read/Write
 

The URL specified by the element's HREF attribute.

 
Example
document.all.myLink.href = "http://www.megacorp.com"
document.links[2].href = "http://www.megacorp.com"
 
Value
String of complete or relative URL.
 
Default None.
MethodsNN n/a   IE 4   DOM n/a
 Read/Write
 

An advisory attribute about the functionality of the destination of a link. A browser could use this information to display special colors or images for the element content based on what the destination does for the user, but Internet Explorer 4 does not appear to do anything with this information.

 
Example
document.links[1].Methods = "post"
 
Value
Any valid HTTP method as a string.
 
Default None.
mimeTypeNN n/a   IE 4   DOM n/a
 Read-only
 

Returns a plain-language version of the MIME type of the destination document at the other end of the link specified by the HREF or SRC attribute. You could use this information to set the cursor type during a mouse rollover. Do not confuse this property with the navigator.mimeTypes[] array and individual mimeType objects that Netscape Navigator refers to. Not available in IE 4/Macintosh.

 
Example
if (document.all.myLink.mimeType == "GIF Image") {
    ...
}
 
Value
A plain-language reference to the MIME type as a string.
 
Default None.
nameNN 2   IE 3   DOM 1
 Read/Write
 

The identifier associated with an element that turns it into an anchor. You can also use the name as part of the object reference.

 
Example
if (document.links[3].name == "section3") {
    ...
}
 
Value
Case-sensitive identifier that follows the rules of identifier naming: it may contain no whitespace, cannot begin with a numeral, and should avoid punctuation except for the underscore character.
 
Default None.
namePropNN n/a   IE 4   DOM n/a
 Read-only
 

Returns just the filename, rather than the full URL, of the HREF attribute set for the element. Not available in IE 4/Macintosh.

 
Example
if (document.all.myElement.nameProp == "logo2.gif") {
    ...
}
 
Value
String.
 
Default None.
pathnameNN 2   IE 3   DOM 1
 Read/Write
 

The pathname component of the URL assigned to the element's HREF attribute. This consists of all URL information following the last character of the domain name, including the initial forward slash symbol.

 
Example
document.all.myLink.pathname = "/images/logoHiRes.gif"
document.links[2].pathname = "/images/logoHiRes.gif"
 
Value
String.
 
Default None.
portNN 2   IE 3   DOM 1
 Read/Write
 

The port component of the URL assigned to the element's HREF attribute. This consists of all URL information following the colon after the last character of the domain name. The colon is not part of the port property value.

 
Example
document.all.myLink.port = "80"
document.links[2].port = "80"
 
Value
String (a numeric value as string).
 
Default None.
protocolNN 2   IE 3   DOM 1
 Read/Write
 

The protocol component of the URL assigned to the element's HREF attribute. This consists of all URL information up to and including the first colon of a URL. Typical values are: "http:", "file:", "ftp:", and "mailto:".

 
Example
document.all.secureLink.protocol = "https"
document.secureLink.protocol = "https"
 
Value
String.
 
Default None.
protocolLongNN n/a   IE 4   DOM n/a
 Read-only
 

A verbose description of the protocol implied by the URL of the HREF attribute or href property. Not supported in IE 4/Macintosh.

 
Example
if (document.all.myLink.protocolLong == "HyperText Transfer Protocol") {
    statements for treating document as server file
}
 
Value
String.
 
Default None
recordNumberNN n/a   IE 4   DOM n/a
 Read-only
 

Used with data binding, returns an integer representing the record within the data set that generated the element). Values of this property can be used to extract a specific record from an Active Data Objects (ADO) record set (see recordset property).

 
Example
<SCRIPT FOR="tableTemplate" EVENT="onclick">
    myDataCollection.recordset.absoluteposition = this.recordNumber
    ...
</SCRIPT>
 
Value
Integer.
 
Default None.
relNN n/a   IE 4   DOM 1
 Read/Write
 

Defines the relationship between the current element and the destination of the link. Also known as a forward link, not to be confused in any way with the destination document whose address is defined by the HREF attribute. This property is not used yet in Internet Explorer 4, but you can treat the attribute as a kind of parameter to be checked and/or modified under script control. See the discussion of the A element's REL attribute in for a glimpse of how this property may be used in the future.

 
Value
Case-insensitive, space-delimited list of HTML 4.0 standard link types (as a single string) applicable to the element. Sanctioned link types are:
alternate
contents
index
start
appendix
copyright
next
stylesheet
bookmark
glossary
prev
subsection
chapter
help
section
 
Default None.
revNN n/a   IE 4   DOM 1
 Read/Write
 

Defines the relationship between the current element and the destination of the link. Also known as a reverse link. This property is not used yet in Internet Explorer 4, but you can treat the attribute as a kind of parameter to be checked and/or modified under script control. See the discussion of the A element's REV attribute in for a glimpse of how this property may be used in the future.

 
Value
Case-insensitive, space-delimited list of HTML 4.0 standard link types (as a single string) applicable to the element. See the rel property for sanctioned link types.
 
Default None.
tabIndexNN n/a   IE 4   DOM 1
 Read/Write
 

A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their tabIndex properties are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest tabIndex value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same tabIndex values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the tabIndex property or have the value set to zero. These elements receive focus in the order in which they appear in the document. A value of -1 removes the element from tabbing order altogether.

Note that the Macintosh user interface does not provide for giving focus to elements other than text and password INPUT fields.

 
Example
document.all.link3.tabIndex = 6
 
Value
Integer.
 
Default None.
targetNN 2   IE 3   DOM 1
 Read/Write
 

The name of the window or frame that is to receive content as the result of navigating to a link. Such names are assigned to frames by the FRAME element's NAME attribute; for subwindows, the name is assigned via the second parameter of the window.open( ) method. If you are scripting the navigation of another window or frame, use the window or frame name in a statement that assigns a new URL to the location.href property (frameName.location.href = "newURL").

 
Example
document.all.homeLink.target = "_top"
document.links[3].target = "_top"
 
Value
String value of the window or frame name, or any of the following constants (as a string): _parent | _self | _top | _blank. The _parent value targets the frameset to which the current document belongs; the _self value targets the current window; the _top value targets the main browser window, thereby eliminating all frames; and the _blank value creates a new window of default size.
 
Default None.
urnNN n/a   IE 4   DOM n/a
 Read/Write
 

A Uniform Resource Name (URN) version of the destination document specified in the HREF attribute. This attribute is intended to offer support in the future for the URN format of URI, an evolving recommendation under discussion at the IETF (see RFC 2141). Although supported in IE 4, this attribute does not take the place of the HREF attribute.

 
Example
document.all.link3.urn = "http://www.megacorp.com"
 
Value
Complete or relative URN as a string.
 
Default None.
blur( )NN n/a   IE 4   DOM n/a

Removes focus from the current element and fires an onBlur event (in IE). No other element necessarily receives focus as a result.

 
Returned Value
None.
 
Parameters
None.
focus( )NN n/a   IE 4   DOM n/a

Gives focus to the current element and fires the onFocus event (in IE). If another element had focus at the time, it receives an onBlur event.

 
Returned Value
None.
 
Parameters
None.