JavaScript Reference/Javascript Objects/selection

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

"selection" Event handlers

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



"selection" Example

    
<html>
<body>
<body onclick="alert(document.selection.type);">
<p>Select this text</p></body>
</body>
</html>



"selection" JavaScript Methods

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



"selection" JavaScript Properties

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



"selection" Syntax and Note

Note:
Represents a highlighted area in the document.
    
Syntax:
    
document.selection.memberName