Advertisement
Home Open Editor ❯

HTML onscroll event Attribute

Example

<div id="myDIV" onscroll="myFunction()">

Try this code ❯

Meaning

The onscroll attribute specifies the script to be run when an element's scrollbar is being scrolled.


Standard Syntax

<element onscroll="script">


Advertisement

Attribute Values

Value Description
script Specifies the script to be run on onscroll

Technical Details

Supported HTML elements:

<address>, <blockquote>, <body>, <caption>, <center>, <dd>, <dir>, <div>, <dl>, <dt>, <fieldset>, <form>, <h1> to <h6>, <html>, <li>, <menu>, <object>, <ol>, <p>, <pre>, <select>, <tbody>, <textarea>, <tfoot>, <thead>, <ul>
Home Open Editor ❯
Advertisement