GlobalEventHandlers.onscroll

<!doctype html> <html lang = "en"> <head> <meta charset ="utf-8" /> <style> #container { position:absolute; height:auto; top:0; bottom:0; width:auto; left:0; right:0; overflow:auto; } #foo { height:1000px; width:1000px; background-color: #777; display:block; } </style> </head> <body> <div id ="container"> <div id ="foo"></div> </div> <script type="text/ javascript"> document.getelementbyid('container').onscroll = function(){ console.log ("scrolling"); }; </script> </body> </html>
Un manejador de eventos para desplazamiento en element.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.