一、視口寬度
1、window.innerWidth 返回當(dāng)前視口寬度
2抓歼、window.innerHeight 返回當(dāng)前視口高度
二、鼠標(biāo)事件
1拢锹、點(diǎn)擊事件:onclick
2谣妻、雙擊事件:ondblclick(雙擊事件是先執(zhí)行兩遍點(diǎn)擊事件,再執(zhí)行雙擊)
3卒稳、鼠標(biāo)右擊點(diǎn)擊事件:oncontextmenu
4蹋半、鼠標(biāo)進(jìn)入事件:onmouseenter
5、鼠標(biāo)離開(kāi)事件:onmouseleave
注意:onmouseover也是鼠標(biāo)進(jìn)入事件充坑,onmouseout也是鼠標(biāo)離開(kāi)事件减江,但是當(dāng)元素里面存在子元素時(shí),鼠標(biāo)在元素中移動(dòng)時(shí)會(huì)反復(fù)觸發(fā) onmouseover 和 onmouseout
6捻爷、鼠標(biāo)移動(dòng)事件:onmousemove
7辈灼、 鼠標(biāo)按下事件:onmousedown
8、 鼠標(biāo)彈起事件:onmouseup