Textarea.onSelect

JavaScript1.0+, JScript1.0+ IE3+ Syntax

onSelect="command"

Description

The onSelect event handler of an instance of a Textarea object is fired when the text in the area is highlighted. Care should be taken when using this event handler, because it is possible to get into an infinite loop when using other events or methods that are fired when the focus is placed on the text area.

Note

Note that Netscape defined this function in JavaScript 1.0, however, it is not fully implemented in any version released to date. Opera browsers do not support this function either.

Example

Listing 7.519 has two text areas. If the user highlights the text in the first text area, the default text of the first text area is written to the ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.