js onscroll event 1

js onscroll event

// HTML:

// JavaScript:
object.addEventListener("scroll", myScript)
// or
object.onscroll = function() { /*...*/ }

Here is what the above code is Doing:
1. The first line is the HTML code that is used to call the JavaScript function.
2. The second line is the JavaScript code that is used to call the function.
3. The third line is the JavaScript code that is used to call the function.

Similar Posts