摘要: $().each 在dom处理上面用的较多。如果页面有多个input标签类型为checkbox,对于这时用$().each来处理多个checkbook,例如: 遍历一个数组通常用$.each()来处理 例如: $.each([{name:"limeng",email:"xfjylimeng"},{n 阅读全文
posted @ 2017-06-16 18:47 Booo 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1、getBoundingClientRect的作用 getBoundingClientRect用于获取某个html元素相对于视窗的位置集合。 执行 object.getBoundingClientRect();会得到元素的top、right、bottom、left、width、height属性,这 阅读全文
posted @ 2017-06-16 12:25 Booo 阅读(1263) 评论(0) 推荐(0) 编辑
摘要: 获取浏览器高度和宽度 document.documentElement.clientWidth ==> 浏览器可见区域宽度 document.documentElement.clientHeight ==> 浏览器可见区域高度 $(document).width() ==> 浏览器可见区域宽度$(d 阅读全文
posted @ 2017-06-16 10:56 Booo 阅读(293) 评论(0) 推荐(0) 编辑