随笔分类 -  原生JS

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