Export (0) Print
Expand All
3 out of 3 rated this helpful - Rate this topic

selectionchange | onselectionchange event

Fires when the selection state of a document changes.

Syntax

HTML Attribute <element onselectionchange = "handler(event)">
Event Property object.onselectionchange = handler;
attachEvent Method object.attachEvent("onselectionchange", handler)
addEventListener Method object.addEventListener("selectionchange", handler, useCapture)

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

There are no standards that apply here.

Remarks

To invoke this event, do one of the following:

  • Cause the selection object's type property to change.
  • Return a range from a different location when using the createRange method of the selection object.
  • Move the insertion point in an editable region of the document using the mouse or keyboard.
  • Refresh the page when an editable region has focus.
  • Start or extend a text selection by dragging the mouse or using SHIFT+an arrow key.
  • Make a control selection in an editable region of the document.
  • Add or remove an element from a multiple selection by pressing SHIFT while clicking on the element.
  • Delete text or an element in an editable region of the document by using the BACKSPACE key, DELETE key, CTRL+X, or the Delete command.
  • Insert text or an element in an editable region of the document by using CTRL+V or the Paste command.

The pEvtObj parameter is required for the following interfaces:

See also

document
Modifying Documents in Edit Mode

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.