![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
weg-js
羽扇冰晶
承君一诺
展开
-
js设计模式之 --工厂模式
工厂模式var People = (function () { var People = function (name, age, weight) { this.name = name; this.age = age; this.weight = weight; }; return function (name, age, weight) { return转载 2017-06-24 21:06:45 · 149 阅读 · 0 评论 -
div滚到底部加载
scrollTop:滚动条在Y轴上的滚动距离。clientHeight:内容可视区域的高度。scrollHeight:内容可视区域的高度加上溢出(滚动)的距离。滚动条到底部的为//body 也行if(div.scrollTop + div.clientHeight == div.scrollHeight。){ //todo ajax request}翻译 2018-01-18 15:25:52 · 278 阅读 · 0 评论