jQuery scroll() 方法
jQuery 教程
· 2019-03-09 21:59:15
实例
对元素滚动的次数进行计数:
$("div").scroll(function(){
$("span").text(x+=1);
});
定义和用法
当用户滚动指定的元素时,会发生 scroll 事件。
scroll 事件适用于所有可滚动的元素和 window 对象(浏览器窗口)。
scroll() 方法触发 scroll 事件,或规定当发生 scroll 事件时运行的函数。
语法
触发被选元素的 scroll 事件:
$(selector).scroll()
添加函数到 scroll 事件:
$(selector).scroll(function)
| 参数 | 描述 |
|---|---|
| function | 可选。规定当 scroll 事件被触发时运行的函数。 |
点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html
Web Applications (Hacking Exposed)
Joel Scambray、Mike Shema / McGraw-Hill Osborne Media / 2002-06-19 / USD 49.99
Get in-depth coverage of Web application platforms and their vulnerabilities, presented the same popular format as the international bestseller, Hacking Exposed. Covering hacking scenarios across diff......一起来看看 《Web Applications (Hacking Exposed)》 这本书的介绍吧!