JavaScript Reference/Event Handlers Reference/onSelectionChange

Материал из Web эксперт
Версия от 08:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"onSelectionChange" Example

    
<head>
<script language="JavaScript" for=document event=onselectionchange>
   alert("The selection has changed");
</script>
</head>
<body>
<p>Copy this text into the textarea element below.</p>
<form>
<textarea cols=30 contenteditable=true>Click here</textarea>
</form>
</body>



"onSelectionChange" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |document                        <samp>                        |
+----------------+--------------------------------------------------------------+



"onSelectionChange" Properties

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



"onSelectionChange" Syntax and Note

Note:
    
This event fires when a document"s selection state is changed.
This event is also triggered by the <samp> element.