Code
Execute
<!DOCTYPE html> <html> <head> <title>html tutorial - html5 - html code - html form - In 30Sec by Microsoft Award MVP - | wikitechy onscroll attribute</title> <style> #myDIV { border: 1px solid black; width: 300px; height: 150px; overflow: scroll; } </style> </head> <body> <h3>Welcome to Wikitechy.com</h3> <h5>Wikitechy technology tutorials</h5> <p>To need more details scroll down:</p> <div id="myDIV" onscroll="OnScroll()">Wikitechy tutorials includes various technologies like HTML,CSS,GITHUB,ANGULAR JS etc., <br><br> HTML - Hyper Text Markup Language HTML is a typical markup language used for building a web pages. The word "Markup" means a language with particular syntax which instructs a Web browser to how the page needs to display. HTML uses a pre-defined set of elements called tags. A group of elements which is join together to build the web page. HTML tags defines elements like "paragraph", "body", and so on. </div> <script> function OnScroll() { document.getElementById("myDIV").style.color = "blue"; } </script> </body> </html>
Result