## 1.创建一个元素
~~~
var $item =$("<div class='one'></div>")
~~~
## 2.获取页面某一元素的绝对X,Y坐标,可以用offset():
```
var X = $(‘#DivID’).offset().top;
var Y = $(‘#DivID’).offset().left;
```
## 3.判断元素是否到达页面底部
~~~
function isReachBottom() {
var dh = $(document).height();
var wh = $(window).height();
var sh = $(window).scrollTop();
return (dh == Math.ceil(wh+sh))? true : false;
}
~~~
## 4.获取可视区域的高度
```
var wh = $(window).height();
//var winHeight = window.innerHeight;
var winHeight = document.documentElement.clientHeight;
console.log(winHeight)
console.log(wh)
```
## 5.滚动条距离顶部的高度
~~~
var scrollH = document.documentElement.scrollTop;
var sh = $(window).scrollTop();
console.log(scrollH)
~~~
## 6.文档的高度
```
var dh = $(document).height()
var docH = document.body.scrollHeight;