JavaScript Reference/Event Handlers Reference/onScroll

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

"onScroll" Example

   <source lang="javascript">
   

<html> <body onscroll="alert("The user is scrolling the document")">

  















Reduce the size of your browser to see a scroll bar

</body> </html>


     </source>
   
  


"onScroll" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<applet> | | |<body> <custom> |

| |
<embed> |

| |<map> <marquee> |

| |<object> | | |
<textarea> | | | window |

+----------------+--------------------------------------------------------------+

     </source>
   
  


"onScroll" Properties

   <source lang="javascript">

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

     </source>
   
  


"onScroll" Syntax and Note

   <source lang="javascript">

Note:

This event fires when moving the scroll object bar.


</source>