js
hanrui11
这个作者很懒,什么都没留下…
展开
-
jquery中的尺寸
jquery中提供了很多处理元素尺寸的方法: 1.width() 2.innerWidth() 3.outerWidth() 4.outerWidth(true) …… 在网上看见一张不错的图片,随手画了一下: 现在来说一下大概的用法 element.width()用来获取元素的宽度; element.innerHeight() = 元素的宽度+padding; element.原创 2017-03-29 09:51:26 · 212 阅读 · 0 评论 -
javascript内置对象Array
创建数组 const array = [1,2,3]; // arr.length是数组中所有元素的长度 console.log(array.length) // 3 通过索引查找元素 const array = ['a', 'b', 'c']; console.log(array[0]) // a 遍历数组 for循环 // 遍历数组的方法很多,先来个基础点的...原创 2018-04-18 11:03:20 · 125 阅读 · 0 评论