asp.net.ph

Skip Navigation Links

onscroll Event


Occurs when a document view is scrolled.

Syntax

Inline <element onscroll = "handler" ... >
Script object.onscroll = handler

Remarks

Bubbles No
Cancels No
To invoke Begin scrolling in the object that has a scroll bar.
  • Click and drag the scroll box with the mouse.
  • Click the scroll arrow.
  • Click the scroll bar.
  • Invoke the doScroll method.
  • Press PAGE UP or PAGE DOWN.
  • Press the ARROW UP or ARROW DOWN until scrolling occurs.
Default action Scrolls the contents of an object until new portions of the object become visible.

A scroll event fires whenever the scroll box is repositioned in the scroll bar.

Programmatic control of scroll bar components is provided by the componentFromPoint and doScroll methods.

CSS enables scrolling on all objects through the overflow property. Such objects are not listed in the Applies To list for this event.

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Applies To

APPLET, BDO, BODY, DIV, EMBED, HTMLAREA, MAP, MARQUEE, OBJECT, SELECT, TABLE, TEXTAREA

See Also

componentFromPoint, doScroll


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note