一、DCMA内置对象
let num:Number = new Number()
let date: Date = new Date()
let reg: RegExp = new RegExp('')
let error: Error = new Error()
let xhr:XMLHttpRequest = new XMLHttpRequest()
二、获取DOM
单个节点
1.HTML(元素名称)Element
let div = document.querySelector('canvas') //HTMLcanvasElement
2.HTMLElement
let div = document.querySelector('header') //HTMLElement
3.断言 as Element
let div = document.querySelector('header') as Element //Element
多个节点
1.NodeList
let div:NodeList = document.querySelectorAll('div')