Dom选择器
getElementById 通过id获取对象
getElementsByClassName 通过class属性获取对象
getElementsByTagName 通过标签名获取对象
getElementByName 查询元素name的属性
querySelector 通过css选择器查找html元素
举列:
app.children 获取子元素
app.parentElement 父集元素
app.nextElementSibling 下一个兄弟节点
app.previousElementSibling 上一个兄弟节点
document.createElement(“元素名”) 创建节点
A.appendChild(B) 把B节点追加至A节点的末尾
firstElementChild 第一个子节点
lastElementChild 最后一个子节点
鼠标事件
onmouseover 鼠标经过
onmouseout 鼠标离开
onmousedown 鼠标按下
onmouseup 鼠标释放
onmousemove 鼠标移动
oncontextmenu 鼠标右键单击
表单事件
onfocus 元素获得焦点
onblur 元素失去焦点