JavaScript Reference/Javascript Objects/selection

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

"selection" Event handlers

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Event handlers:|onTimeError | +----------------+--------------------------------------------------------------+

     </source>
   
  


"selection" Example

   <source lang="javascript">
   

<html> <body> <body onclick="alert(document.selection.type);">

Select this text

</body>

</body> </html>


     </source>
   
  


"selection" JavaScript Methods

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | JavaScript |clear createRange | | Methods |empty | +----------------+--------------------------------------------------------------+

     </source>
   
  


"selection" JavaScript Properties

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | JavaScript |type typeDetail | +----------------+--------------------------------------------------------------+

     </source>
   
  


"selection" Syntax and Note

   <source lang="javascript">

Note: Represents a highlighted area in the document.

Syntax:

document.selection.memberName


     </source>