摘要:
一、querySelector() 的定义 querySelector() 方法选择指定 CSS 选择器的第一个元素 querySelectorAll() 方法选择指定的所有元素 二、与 getElementBy 的区别 这两个新添加的 API 与 getElementById() / getEle 阅读全文
摘要:
一、类的定义 ES5 构造函数的写法: function Point(x, y) { this.x = x; this.y = y; } ES6 引入了 Class(类),通过class关键字,可以定义类。 class Point { constructor(x, y) { this.x = x; 阅读全文