JavaScript » eventhandler » onSelect

Syntax:
onSelect = myJavaScriptCode

Event handler for Text,Textarea

The onSelect event handler is used to execute specified JavaScript code whenever the user selects some of the text within a text or textarea field. The onSelect event handler uses the following properties of the Event Object:
 
type - indicates the type of event.
target - indicates the target object to which the event was sent.

Examples

Code:
<INPUT TYPE="text" onSelect="selectEvent()">
Explanation:

In this example, selecting some of the text in the Text object causes the 'selectEvent' function to execute.

See Also: