Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

 

 

Show:
© 2017 Microsoft