asp.net.ph

Skip Navigation Links

onselect Event


Fires when the current selection changes.

Syntax

Inline <element onselect = "handler" ... >
Script object.onselect = handler

Remarks

Bubbles No
Cancels Yes
To invoke Initiate text selection.
  • Move the mouse from character to character during a drag selection.
  • Press the SHIFT key while moving the cursor over text.
Default action Moves the selection to a given character and highlights that selection.

A select event occurs when a user selects some text in a text field.

This event is valid for INPUT and TEXTAREA elements.

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Applies To

HTMLAREA, INPUT type=text, TEXTAREA

See Also

onselectstart, select


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note