IHTMLButtonElement

IHTMLButtonElement


This interface renders content as an HTML button.

This element is a block element.

IHTMLButtonElement Methods
get_type   put_value   get_value  
put_name   get_name   put_status  
get_status   put_disabled   get_disabled  
get_form   createTextRange  

IHTMLButtonElement::get_type

HRESULT get_type(
    BSTR *p
);

Retrieves the visual appearance and default behavior of the button.

p
Address of a string variable that receives one of these strings:
button Creates a command button. This is the default value for this property.
reset Creates a reset button. If in a form, this button resets the fields in the form to their initial values.
submit Creates a submit button. If in a form, this button submits the form.

IHTMLButtonElement::put_value

HRESULT put_value(
    BSTR v
);

Sets the value of the button control. The value is submitted to the server as a name/value pair.

v
String value specifying the value.

See also get_value

IHTMLButtonElement::get_value

HRESULT get_value(
    BSTR *p
);

Retrieves the value of the button control. The value is submitted to the server as a name/value pair.

p
Address of a string variable that receives the value.

See also put_value

IHTMLButtonElement::put_name

HRESULT put_name(
    BSTR v
);

Sets the name of the button control.

v
String value specifying the name.

This method is related to the name property of the BUTTON object.

See also get_name

IHTMLButtonElement::get_name

HRESULT get_name(
    BSTR *p
);

Retrieves the name of the button control.

v
Address of a string variable that receives the name.

This method is related to the name property of the BUTTON object.

See also put_name

IHTMLButtonElement::put_status

HRESULT put_status(
    VARIANT v
);

Sets the status of the button control.

v
VARIANT structure specifying the status. Can be TRUE, FALSE, or NULL.

See also get_status

IHTMLButtonElement::get_status

HRESULT get_status(
    VARIANT *p
);

Retrieves the status of the button control.

p
Address of a VARIANT structure that receives the status. Can be TRUE, FALSE, or NULL.

See also put_status

IHTMLButtonElement::put_disabled

HRESULT put_disabled(
    VARIANT_BOOL v
);

Enables or disables the control. A disabled control appears greyed and does not respond to user input.

v
Boolean value specifying whether to disable the control. If TRUE, the control is disabled; otherwise, it is enabled.

The default value for this property is FALSE.

See also get_disabled

IHTMLButtonElement::get_disabled

HRESULT get_disabled(
    VARIANT_BOOL *p
);

Determines whether the control is enabled or disabled.

p
Address of a Boolean variable that receives TRUE if the control is disabled, or FALSE otherwise.

The default value for this property is FALSE.

See also put_disabled

IHTMLButtonElement::get_form

HRESULT get_form(
    IHTMLFormElement **p
);

Retrieves a reference to the form the element is embedded on.

p
Address of a pointer to the IHTMLFormElement interface of the form element. This parameter receives NULL if the element is not on a form.

See also IHTMLFormElement

IHTMLButtonElement::createTextRange

HRESULT createTextRange(
    IHTMLTxtRange **range
);

Creates a text range object for the BUTTON object. You use a text range to examine and modify the text within the element.

range
Address of a pointer to the IHTMLTxtRange interface of the text range created.

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