随笔分类 - 原生JS
原声js相关知识
摘要:1. 原型链继承 (原型链) function Parent() { this.fruits = ['apple', 'orange']; } Parent.prototype.sayHello = function () { console.log('Parent'); }; function C
阅读全文
摘要:DOM 原生方法getBoundingClientRect()获取元素相对视口位置
阅读全文
摘要:看到很多人傻傻的分不清楚 AMD、CMD 、 commonJS 、 es6的区别,实际上这跟这几年前段技术的发展有很大的关系。 实际上这是JavaScript的模块化思想演进的一个过程。 最开始的时候我们都是在 首页 index.html 中,通过N多个<script>标签来引入各个js文件(每个j
阅读全文

浙公网安备 33010602011771号