HTML onscroll event Attribute
Example
<div id="myDIV" onscroll="myFunction()">
Meaning
The onscroll attribute specifies the script to be run when an element's scrollbar is being scrolled.
Standard Syntax
<element onscroll="script">
Browser Support
Status
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>