IHTMLStyleElement

IHTMLStyleElement


This interface specifies the style sheet for the page.

This element can be used only within either the HEAD or BODY element.

IHTMLStyleElement Methods
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  

IHTMLStyleElement::get_disabled

HRESULT get_disabled(
    VARIANT_BOOL *p 
);

Retrieves the Boolean value that determines whether this style element is disabled.

p
Address of a variable that receives TRUE if the style element is enabled, or FALSE otherwise.

See also put_disabled

IHTMLStyleElement::get_media

HRESULT get_media(
    BSTR *p 
);

Retrieves the string that indicates which media this style element applies to.

p
Address of a string that receives the media type.

See also put_media

IHTMLStyleElement::get_onerror

HRESULT get_onerror(
    VARIANT *p 
);

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

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

p
Address of a VARIANT structure that contains the error script. See onerror for more information.

See also put_onerror

IHTMLStyleElement::get_onload

HRESULT get_onload(
    VARIANT *p 
);

Retrieves the script associated with the onload event on the STYLE element. Occurs immediately after the browser loads the given object.

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

p
Address of a VARIANT structure that contains the script.

See also put_onload

IHTMLStyleElement::get_onreadystatechange

HRESULT get_onreadystatechange(
    VARIANT *p 
);

Retrieves the script associated with the onreadystatechange event on the STYLE element.

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

p
Address of a VARIANT structure that contains the script.

See also put_onreadystatechange

IHTMLStyleElement::get_readyState

HRESULT get_readyState(
    BSTR *p 
);

Retrieves the current state of an object being downloaded.

p
Address of a variable that receives the current 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.
uninitialized The object is not created. Usually when the object is being downloaded.

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

IHTMLStyleElement::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 also IHTMLStyleSheet

IHTMLStyleElement::get_type

HRESULT get_type( 
    BSTR *p 
);

Retrieves the CSS language in which the style sheet is written.

p
Address of a variable that receives the CSS language. It can be any string, including an empty string. Valid style sheets are typically set to "text/css".

See also put_type

IHTMLStyleElement::put_disabled

HRESULT put_disabled(
    VARIANT_BOOL v 
);

Sets the Boolean value that determines whether this style element is disabled.

v
String specifying the status of the StyleElement. This parameter is TRUE if the style element is disabled, or FALSE otherwise. See STYLE for details.

See also get_disabled

IHTMLStyleElement::put_media

HRESULT put_media(
    BSTR v 
);

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

v
String value specifying the type of media for this style element.

See also get_media, IHTMLLinkElement

IHTMLStyleElement::put_onerror

HRESULT put_onerror(
    VARIANT v 
);

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

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

v
VARIANT structure that contains the script to be set. See onerror for more information.

See also get_onerror

IHTMLStyleElement::put_onload

HRESULT put_onload( 
    VARIANT v 
);

Sets the script associated with the onload event on the STYLE element. Occurs immediately after the browser loads the given object.

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

v
VARIANT structure that contains the script to be set.

See also get_onload

IHTMLStyleElement::put_onreadystatechange

HRESULT put_onreadystatechange(
    VARIANT v 
);

Sets the script associated with the onreadystatechange event on the STYLE element.

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

v
VARIANT structure that contains the script to be set.

See also get_onreadystatechange

IHTMLStyleElement::put_type

HRESULT put_type( 
    BSTR v 
);

Sets the CSS language in which the style sheet is written.

v
String specifying the CSS language. It can be any string, including an empty string. Valid style sheets are typically set to "text/css".

See also get_type

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