Export (0) Print
Expand All

IHTMLAnchorElement interface

Designates the destination of a hypertext link.

Members

The IHTMLAnchorElement interface inherits from the IDispatch interface. IHTMLAnchorElement also has these types of members:

Methods

The IHTMLAnchorElement interface has these methods.

MethodDescription
blur

Causes the element to lose focus and fires the HTMLFrameSiteEvents::onblur event.

focus

Causes the element to receive the focus and executes the code specified by the HTMLFrameSiteEvents::onfocus event.

 

Properties

The IHTMLAnchorElement interface has these properties.

PropertyDescription

accessKey

Sets or retrieves the access key for the object.

hash

Sets or retrieves the subsection of the IHTMLAnchorElement::href property that follows the number sign (#).

host

Sets or retrieves the IHTMLAnchorElement::hostname and IHTMLAnchorElement::port number of the location or URL.

hostname

Sets or retrieves the host name part of the location or URL.

href

Sets or retrieves a destination URL or an anchor point.

Methods

Sets or gets the list of HTTP methods supported by the object.

name

Sets or retrieves the name of the object.

nameProp

Retrieves the file name specified in the IHTMLAnchorElement::href or IHTMLEmbedElement2::src property of the object.

onblur

Sets or retrieves a pointer to the event handler function associated with the HTMLFrameSiteEvents::onblur event.

onfocus

Sets or retrieves a pointer to the event handler function associated with the HTMLFrameSiteEvents::onfocus event.

pathname

Sets or retrieves the file name or path specified by the object.

port

Sets or retrieves the port number associated with a URL.

protocol

Sets or retrieves the protocol portion of a URL.

rel

Sets or retrieves the relationship between the object and the destination of the link.

rev

Sets or retrieves the relationship between the object and the destination of the link.

search

Sets or retrieves the substring of the IHTMLLocation::href property that follows the question mark.

tabIndex

Sets or retrieves the index that defines the tab order for the object.

target

Sets or retrieves the window or frame at which to target content.

urn

Sets or gets a URN for a target document.

 

Remarks

When an anchor contains an image, the image has a border by default. The color of the border reflects the visited or unvisited status of the link.

This interface may also be referred to in code as IOmLink.

This interface may also be referred to in code as IOmAnchor.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IHTMLAnchorElement2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft