JavaScript Reference/Event Handlers Reference/onSelectionChange — различия между версиями

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

Текущая версия на 08:22, 26 мая 2010

"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.