我這有個頁面 我的想法是當鼠標進入‘顯示’連接后顯示隱藏的div 出去后再影藏但是當鼠標進入的是影藏的div時 該div不影藏 請問該怎么做代碼:<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>mouseover測試</title><style type="text/css"><!--#hdiv{background:#EEEEEE;border-radius:4px;border-shadow:2px;position:absolute;left:10px;top:2opx;width:300px;height:200px;}--></style><script type=text/javascript><!--//--><![CDATA[//><!--function showDiv(){ var hdiv = document.getElementById("hdiv");hdiv.style.display = "block";}function hideDiv(){var hdiv = document.getElementById("hdiv");hdiv.style.display = "none";}//--><!]]></script></head><body><a href="" onMouseover="showDiv()" onMouseout="hideDiv()">顯示</a><div id="hdiv" style="display:none">隱藏內容</div></body></html>
求教關于js mouseout和mouseover 的一個問題,具體看下面的情況?
弒天下
2021-06-09 11:07:29