onselectionchange event | selectionchange event
Occurs when the selection in the document has changed.
To get the current selection within the document, use the selection object in Internet Explorer.
How to register:
This event cannot be registered in HTML.
|object.onselectionchange = handler;|
|object.addEventListener ("selectionchange", handler, useCapture);|
|object.attachEvent ("onselectionchange", handler);|
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers. The properties of the event object contain additional information about the current event. To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
Actions that invoke the onselectionchange event:
The order of events related to the onselectionchange event:
Example HTML code 1:
This example illustrates the use of the onselectionchange event:
Did you find this example helpful?
User Contributed Comments