<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>js鼠標(biāo)移入移除顯現(xiàn)與隱藏</title>
<script>
function m_over() {
//獲取div里面名為"qq"的id鼠標(biāo)移入時(shí)將其顯現(xiàn)
var qq = document.getElementById('qq');
qq.style.display = "block";
qq.style.backgroundColor = "red";
}
//獲取div里面名為"qq"的鼠標(biāo)移除是將其隱藏
function m_out() {
var qq =document.getElementById('qq');
qq.style.display = "none";
}
</script>
</head>
<body>
<div onmouseover="m_over(this)" onmouseout="m_out(this)">顯示部分
</div>
<div id="qq" style="display:none" >
<b>隱藏部分</b>
</div>
</body>
</html>