跟踪滚动事件。 [英] Track Scroll Events.

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

问题描述

如何跟踪JS中的滚动事件。有没有标准的方法呢?

请帮助我......;)

解决方案

使用onscroll事件。它不是任何标准的一部分,但应得到相当好的支持。



使用onscroll事件。它不是任何标准的一部分,但应得到相当好的支持。



我在Mozilla中测试此代码...

展开 | 选择 | 换行 | 行号


< blockquote>有关Mozilla兼容性,请参阅 MDC

How do i track the scroll events in JS. Is there any standard way to do it ?
Please help me ... ;)

解决方案

Use the onscroll event. It''s not part of any standards, but should be reasonably well supported.


Use the onscroll event. It''s not part of any standards, but should be reasonably well supported.

I test this code in Mozilla...

Expand|Select|Wrap|Line Numbers


For Mozilla compatibility, see MDC.


这篇关于跟踪滚动事件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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