<div id="div1">haha</div>
ID不能直接用,会出现兼容性问题
<input type="checkbox"
onmouseover="div1.style.display='block';"
onmouseout="div1.style.display='none';">
应该使用document.getElementById
<input type="checkbox"
onmouseover = "document.getElementById('div1').style.display='block';"
onmouseout = "document.getElementById('div1').style.display='none';">