document.querySelector('p.class#id') 根据id class 标签等获取dom元素
document.getElementById sByClassName sByName sByTagName
获取到dom元素之后 可以进行 .innerHTML设置里面的元素 .outerHTML设置外面的元素
str.substr(0,x) 字符串的截取 包括0不包括x
parseInt() 转整型 parseFloat() typeof()查看类型
for(let i=0;i<x.length;i++)
for(let x of list) es6新增 可以相应break continue return
arr.forEach(function(item,index){}) es5推出 主要功能遍历数组 不能return等操作
arr.map(fucntion(item,index){}) 遍历数组 支持return返回
for(let i in list) 为遍历对象设计的 不适合遍历数组