JavaScript Reference/Event Handlers Reference/onSelect

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

"onSelect" Example

   <source lang="javascript">
   

<html> <body onselect="alert("The user is selecting some body object")">

  Try to select a portion of this text

</body> </html>


     </source>
   
  


"onSelect" is applied to

   <source lang="javascript">

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

     </source>
   
  


"onSelect" Properties

   <source lang="javascript">

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

     </source>
   
  


"onSelect" Syntax and Note

   <source lang="javascript">

Note:

This event fires when highlighting text.


     </source>