$(document).height()和$(window).height()区别
来源:互联网 发布:mac过热 编辑:程序博客网 时间:2024/06/05 17:54
$(window).heigth()指 默认浏览器滚动区域的高度,而$(document).height()指整个文档内容的高度。
而且当浏览器窗口大小改变时(如最大化或拉大窗口后) jQuery(window).height() 随之改变,但是jQuery(document).height()是不变的。
$(document).scrollTop() 获取垂直距离,即当前滚动的地方到整个页面顶端的距离;
$(document).scrollLeft() 这是获取水平滚动条的距离;
要获取顶端 只需要获取到scrollTop()==0的时候 就是顶端了
要获取底端 只要获取scrollTop()>=$(document).height()-$(window).height() 就可以知道已经滚动到底端了
0 0
- $(document).height()和$(window).height()区别
- $(window).height() 和 $(document).height()的区别
- $(window).height() 和 $(document).height()的区别
- $(window).height()和$(document).height()
- jQuery里面的$(window).height()和$(document).height()的区别
- $(document).height()与$(window).height()的区别
- $(document).height()与$(window).height()区别
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- $(document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- (document).height()与$(window).height()
- $(window).height()与$(document).height()
- centos 下安装Hadoop1.2.1
- php最新银联支付chinaPay,最新接口地址
- 网盘搜索,百度云盘搜索神器
- Python selenium —— 动态id、class怎么定位
- 设计模式之装饰者模式
- $(document).height()和$(window).height()区别
- 非IE冒泡与捕获
- 【css】单选框和复选框文字垂直居中问题
- mysql 排行榜函数
- 面向对象基础知识
- 数据结构--原理论述
- 题记
- volatile与synchronized
- linux下jpeg图片Exif标识