Click to return to the Reusing Browser Technology home page    
IHTMLLabelElement::get_ac...     IHTMLLegendElement Interf...     IHTMLLabelElement Interfa...    
Web Workshop  |  Reusing Browser Technology

IHTMLLabelElement::get_htmlFor Method


Retrieves the control-like element to assign the given label element to. This property corresponds to the FOR= attribute in HTML.

Syntax

HRESULT get_htmlFor( 
    BSTR *p 
);

Parameters

p
Address of a variable that receives the control-like element.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

The FOR= attribute references the ID of another element. The FOR= attribute is optional when the label is implicitly defined. This is done by wrapping the label around the control the label is specified for.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLLabelElement::put_htmlFor Method


Sets the control-like element to assign the given label element to. This property corresponds to the FOR= attribute in HTML.

Syntax

HRESULT put_htmlFor(
    BSTR v 
);

Parameters

v
String that specifies the control-like element.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

The FOR= attribute references the ID of another element. The FOR= attribute is optional when the label is implicitly defined. This is done by wrapping the label around the control the label is specified for.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.