随笔分类 -  js

数组中的方法
摘要:/*1. every() 对数组的每一项运行给定函数,如果该函数对每一项都返回true,则返回true, var num=[3,4,5,6,7,8,9]; var result=num.every(function(item,index,array){ return (item>2) }); ale 阅读全文

posted @ 2017-03-06 17:49 恐龙野兽 阅读(177) 评论(0) 推荐(0)

滚动到页面底部,更新数据
摘要:scrollBottomTest = function() { $(".main").scroll(function() { var $this = $(this), viewH = $(this).height(), //可见高度 contentH = $(this).get(0).scrollH 阅读全文

posted @ 2017-03-06 17:38 恐龙野兽 阅读(151) 评论(0) 推荐(0)

rem
摘要:(function (doc, win) { var docEl = doc.documentElement, resizeEvt = 'onorientationchange' in window ? 'onorientationchange' : 'resize', recalc = funct 阅读全文

posted @ 2016-11-22 15:53 恐龙野兽 阅读(85) 评论(0) 推荐(0)

验证输入框
摘要:自己写的提示框 都是判断输入内容 显示提醒框 .pc就是藏起来的 提示框 h5 新特性 有默认弹出框 也有自定义弹出框 阅读全文

posted @ 2016-11-22 15:52 恐龙野兽 阅读(116) 评论(0) 推荐(0)

点击显示,点击其他空白隐藏
摘要: 阅读全文

posted @ 2016-11-12 11:54 恐龙野兽 阅读(104) 评论(0) 推荐(0)

导航