捕获“向下滚动"事件? [英] Capturing the "scroll down" event?

查看:19
本文介绍了捕获“向下滚动"事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个非常简单的网页(仅限 HTML),我想要实现的唯一功能"是在用户向下滚动页面时执行某些操作,有没有办法以某种方式捕获该事件"?

I'm designing a very simple web page (HTML only), the only "feature" I want to implement is to do something when the user scrolls down the page, is there a way to capture that "event" somehow?

推荐答案

为了完整性,还有一个使用另一个 JS 框架 (Mootools) 的解决方案

Just for completeness, there's another solution using another JS framework (Mootools)

window.addEvent('scroll',function(e) {
    //do stuff
});

这篇关于捕获“向下滚动"事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆