JavaScript Reference/Event Handlers Reference/onSelect

Материал из Web эксперт
Перейти к: навигация, поиск

"onSelect" Example

    
<html>
<body onselect="alert("The user is selecting some body object")">
   Try to select a portion of this text
</body>
</html>



"onSelect" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<body>                          <input type="text">           |
|                |<textarea>                                                    |
+----------------+--------------------------------------------------------------+



"onSelect" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |ctrlLeft                        clientX                       |
|                |clientY                         offsetX                       |
|                |offsetY                         returnValue                   |
|                |screenX                         screenY                       |
|                |srcElement                      type                          |
|                |x                               y                             |
+----------------+--------------------------------------------------------------+



"onSelect" Syntax and Note

Note:
    
This event fires when highlighting text.