次の方法で共有


ondocumentready Event

Fires when the behavior's containing document has been completely parsed.

Syntax

<PUBLIC:ATTACH
    EVENT = ondocumentready
    ONEVENT = sEventHandler
    FOR = element
    ID = sID
/>

Attributes

  • EVENT
    Required. String that specifies the name of a Dynamic HTML (DHTML) event, or any of the events specific to the HTML Component (HTC) that are listed in the HTC Reference.
  • FOR
    Optional. String that specifies one of the following values to identify the source of the event.
    • document
      Refers to the document object.
    • element
      Default. Refers to the element to which the behavior is attached.
    • window
      Refers to the window object.
  • ID
    Optional. String that uniquely identifies the PUBLIC:ATTACH element within the component. This attribute is analogous to the ID attribute in Dynamic HTML (DHTML).
  • ONEVENT
    Required. String that specifies an inline script or a direct invocation of the event handler function.

Remarks

A behavior attached to an element receives both the ondocumentready and oncontentready notifications, but only after the window. onload event has fired.

See Component Initialization for an overview of events fired during the initialization of an HTC file and its primary document.

See Also

oncontentready, Introduction to DHTML Behaviors, About Element Behaviors, Using HTML Components to Implement DHTML Behaviors in Script