IHTMLLabelElement

IHTMLLabelElement


This interface specifies a label for a control-like element.

Labels cannot be nested.

IHTMLLabelElement Methods
put_htmlFor   get_htmlFor  
put_accessKey   get_accessKey  

IHTMLLabelElement::put_htmlFor

HRESULT put_htmlFor(
    BSTR v 
);

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

v
String specifying the control-like element.

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.

See also get_htmlFor

IHTMLLabelElement::get_htmlFor

HRESULT get_htmlFor( 
    BSTR *p 
);

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

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

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.

See also put_htmlFor

IHTMLLabelElement::put_accessKey

HRESULT put_accessKey(
    BSTR v 
);

Sets an accelerator key for the element. Pressing CTRL+key selects this anchor element in the user's browser.

v
String specifying the key.

See also get_accessKey

IHTMLLabelElement::get_accessKey

HRESULT get_accessKey(
    BSTR *p 
);

Retrieves the accelerator key for the element. Pressing CTRL+key selects this anchor element in the user's browser.

p
Address of a variable that receives the key.

See also put_accessKey

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