摘要: html部分: <textarea id="textarea">哈喽哈喽哈喽哈喽哈喽哈喽哈喽哈喽哈喽哈喽哈喽哈喽</textarea> js部分: <!--textarea高度跟随文字高度而变化--> <script> function makeExpandingArea(el) { var set 阅读全文
posted @ 2018-04-28 10:59 biubiu小希希 阅读(1143) 评论(0) 推荐(0) 编辑
摘要: 箭头函数: 普通函数: 箭头函数相当于匿名函数,并且简化了函数定义。箭头函数有两种格式,一种只包含一个表达式,连{ ... }和return都省略掉了。还有一种可以包含多条语句,这时候就不能省略{ ... }和return。 箭头函数是匿名函数,不能作为构造函数,不能使用new 箭头函数不绑定arg 阅读全文
posted @ 2018-03-20 17:07 biubiu小希希 阅读(91573) 评论(4) 推荐(7) 编辑
摘要: 什么是浏览器兼容问题? 百度百科:浏览器兼容性问题又被称为网页兼容性或网站兼容性问题,指网页在各种浏览器上的显示效果可能不一致而产生浏览器和网页间的兼容问题。在网站的设计和制作中,做好浏览器兼容,才能够让网站在不同的浏览器下都正常显示。而对于浏览器软件的开发和设计,浏览器对标准的更好兼容能够给用户更 阅读全文
posted @ 2018-03-19 15:32 biubiu小希希 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 数组长度 length 遍历数组 forEach 添加元素到数组末尾 push 删除数组末尾的元素 pop 删除数组最前面的元素 shift 添加元素到数组头部 unshift 找出某个元素在数组中的索引,否则返回-1 indexOf 返回某个元素在数组中的索引,从指定位置开始向后查找,否则返回-1 阅读全文
posted @ 2018-01-08 16:20 biubiu小希希 阅读(269) 评论(0) 推荐(0) 编辑
摘要: handleInputChange = (event) => { const target = event.target; const type = target.type; const value = String.prototype.trim.call(target.value); const name = target... 阅读全文
posted @ 2018-01-05 18:06 biubiu小希希 阅读(1772) 评论(0) 推荐(0) 编辑
摘要: mousemove 阅读全文
posted @ 2017-12-29 16:54 biubiu小希希 阅读(693) 评论(1) 推荐(1) 编辑
摘要: canvas最关键的函数是requestAnimationFrame(callback)。 阅读全文
posted @ 2017-12-29 15:36 biubiu小希希 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 一、创建canvas画布 我们要在html里添加一个canvas标签,在js里获取这个元素。 canvas的主要属性有width height,我们可以用js修改这两个属性让canvas布满整个屏幕,达到自适应,然后就是获取2d画布: 二、绘制样式 三、绘制形状 矩形(默认) 圆(弧) 线 多边形 阅读全文
posted @ 2017-12-29 15:24 biubiu小希希 阅读(188) 评论(0) 推荐(0) 编辑
摘要: value,configurable,writable,enumerable, 阅读全文
posted @ 2017-12-28 15:02 biubiu小希希 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 实现行点击,数据排列,异步等 阅读全文
posted @ 2017-12-28 11:13 biubiu小希希 阅读(323) 评论(0) 推荐(0) 编辑