다음을 통해 공유


Standard System Event Support

Applies to: SharePoint Foundation 2010

Web Parts can be registered to receive notifications for standard system events triggered in the browser. Because the browser supports only a single callback function for events, it is better that Web Parts register for system events rather than try to provide an event handler directly. Support for system events varies depending on whether the browser type is Internet Explorer 5.5 or later or an HTML 3.2 or later browser.

The following table lists the events that are provided automatically by the Web Part infrastructure. The NamespaceURN property is "urn:schemas-microsoft-com:dhtml".

Event Name

Description

Browser Support

onafterprint

Runs on the Window object immediately after its associated document prints.

Internet Explorer 5.5 or later

onbeforeprint

Runs on the Window object before its associated document prints.

Internet Explorer 5.5 or later

onbeforeunload

Runs before a page is unloaded.

Internet Explorer 5.5 or later

onblur

Runs when the Window object loses the input focus.

Internet Explorer 5.5 or later

onclick

Runs when a mouse click is detected in the browser window.

Internet Explorer 5.5 or later

onfocus

Runs when the Window object receives the focus.

Internet Explorer 5.5 or later

onhelp

Runs when the user presses the F1 key while the browser is the active window.

Internet Explorer 5.5 or later

onload

Runs immediately after the browser loads the Window object.

Internet Explorer 5.5 or later

onresize

Runs when the user changes the size of the Window object.

Internet Explorer 5.5 or later

onunload

Runs immediately before the Window object is unloaded.

Internet Explorer 5.5 or later

See Also

Concepts

Client-side Programming Using the WPSC

WPSC Data Flow

WPSC Services

Other Resources

Web Part Page Services Component (WPSC) Object Model