IHTMLLinkElement

IHTMLLinkElement


This interface is used to specify a typed link between the document and some other resource.

This element can be used only within the HEAD tag.

IHTMLLinkElement Methods
put_href   get_href   put_rel  
get_rel   put_rev   get_rev  
put_type   get_type   get_readyState   
put_onreadystatechange    get_onreadystatechange    put_onload  
get_onload   put_onerror   get_onerror  
get_styleSheet   put_disabled   get_disabled  
put_media   get_media  

IHTMLLinkElement::put_href

HRESULT put_href(
    BSTR v 
);

Sets the destination URL or anchor point.

v
String specifying the URL or anchor point.

The HREF attribute on the anchor is a scriptable attribute. HREFs on anchors can jump to bookmarks or any element's ID attribute.

See also get_href

IHTMLLinkElement::get_href

HRESULT get_href(
    BSTR *p 
);

Retrieves the destination URL or anchor point.

p
Address of a variable that receives the destination URL or anchor point.

The HREF attribute on the anchor is a scriptable attribute. HREFs on anchors can jump to bookmarks or any element's ID attribute.

See also put_href

IHTMLLinkElement::put_rel

HRESULT put_rel(
    BSTR v 
);

Specifies the relationship(s) described by the hypertext link from the anchor to the target.

v
String specifying the relationship(s). This parameter is a comma-separated list of relationship values.

Values and their semantics will be registered by the HTML registration authority. The default relationship, if none other is given, is void. The rel property is used only when the href property is present.

See also get_rel

IHTMLLinkElement::get_rel

HRESULT get_rel( 
    BSTR *p 
);

Retrieves the relationship(s) described by the hypertext link from the anchor to the target.

v
Address of a variable that receives the relationship(s). This parameter receives a comma-separated list of relationship values.

Values and their semantics will be registered by the HTML registration authority. The default relationship, if none other is given, is void. The rel property is used only when the href property is present.

See also put_rel

IHTMLLinkElement::put_rev

HRESULT put_rev( 
    BSTR v 
);

Same as the rel property, but the semantics of the link type are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor can have both rel and rev properties.

v
String specifying the relationship(s). This parameter is a comma-separated list of relationship values.

See also get_rev

IHTMLLinkElement::get_rev

HRESULT get_rev(
     BSTR *p 
);

Same as the rel property, but the semantics of the link type are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor can have both rel and rev properties.

p
Address of a variable that receives the relationship(s). This parameter receives a comma-separated list of relationship values.

See also put_rev

IHTMLLinkElement::put_type

HRESULT put_type(
    BSTR v 
);

Changes the style of the list.

v
String specifying the list style. Can be one of these values:
1 Use numbers. This is the default value.
a Use small letters.
A Use large letters.
i Use small roman numerals.
I Use large roman numerals.

See also get_type

IHTMLLinkElement::get_type

HRESULT get_type( 
    BSTR *p 
);

Retrieves the current style of the list.

p
Address of a variable that receives the list style. Can be one of these values:
1 Use numbers. This is the default value.
a Use small letters.
A Use large letters.
i Use small roman numerals.
I Use large roman numerals.

See also put_type

IHTMLLinkElement::get_readyState

HRESULT get_readyState(
    BSTR *p 
);

Retrieves the current state of an object being downloaded.

p
Address of a variable that receives the ready state. Can be one of these values:
complete The object is completely loaded.
interactive The object can be interacted with even though it is not fully loaded.
loading The object is currently being loaded.
unitialized The object is not created. Usually when the object is being downloaded.

Each object can independently determine which of the states it exposes.

IHTMLLinkElement::put_onreadystatechange

HRESULT put_onreadystatechange(
    VARIANT v 
);

Sets the inline script associated with the onreadystatechange event on the LINK element. This event occurs whenever the readyState for the object has changed.

v
VARIANT structure that contains the script to be set.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also get_onreadystatechange

IHTMLLinkElement::get_onreadystatechange

HRESULT get_onreadystatechange(
    VARIANT *p 
);

Retrieves the inline script associated with the onreadystatechange event on the LINK element. This event occurs whenever the readyState for the object has changed.

p
Address of a VARIANT structure that contains the script.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also put_onreadystatechange

IHTMLLinkElement::put_onload

HRESULT put_onload(
    VARIANT v 
);

Sets the inline script associated with the onload event on the LINK element. This event occurs immediately after the browser loads the given object.

v
VARIANT structure that contains the script to be set.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also get_onload

IHTMLLinkElement::get_onload

HRESULT get_onload(
    VARIANT *p 
);

Retrieves the inline script associated with the onload event on the LINK element. This event occurs immediately after the browser loads the given object.

p
Address of a VARIANT structure that contains the script.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also put_onload

IHTMLLinkElement::put_onerror

HRESULT put_onerror(
    VARIANT v 
);

Sets the inline script associated with the onerror event on the LINK element. An error event occurs when the loading of a document or image causes an error.

v
VARIANT structure that contains the script to be set.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also get_onerror

IHTMLLinkElement::get_onerror

HRESULT get_onerror(
    VARIANT *p 
);

Retrieves the inline script associated with the onerror event on the LINK element. An error event occurs when the loading of a document or image causes an error.

p
Address of a VARIANT structure that contains the script.

For more information on inline script, see Attaching an Event Handler in the Understanding the Event Model documentation.

See also put_onerror

IHTMLLinkElement::get_styleSheet

HRESULT get_styleSheet( 
    IHTMLStyleSheet **p 
);

Retrieves an interface pointer that provides access to the style sheet object's properties and methods.

p
Address of a variable that receives the interface pointer. See IHTMLStyleSheet for details.

IHTMLLinkElement::put_disabled

HRESULT put_disabled(
    VARIANT_BOOL v 
);

Sets the value of the link as being disabled or not.

v
Disabled flag. TRUE sets the element to disabled; FALSE does not.

See also get_disabled

IHTMLLinkElement::get_disabled

HRESULT get_disabled( 
    VARIANT_BOOL *p 
);

Returns a Boolean value indicating whether this link has been disabled.

p
Address of a variable that receives TRUE if the element is read-only, or FALSE if not.

See also put_disabled

IHTMLLinkElement::put_media

HRESULT put_media(
    BSTR v 
);

Sets the inline script that indicates which media this LINK element applies to.

v
String specifying the media type.

See also get_media

IHTMLLinkElement::get_media

HRESULT get_media(
    BSTR *p 
);

Retrieves the inline script that indicates which media this LINK element applies to.

p
Address of a string variable that receives the media type.

See also put_media

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.