...A”div上,显示“B”div,并且鼠标能够在"B"div移动。如何用js实现...
发布网友
发布时间:2024-10-24 17:43
我来回答
共1个回答
热心网友
时间:2024-11-02 19:42
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RunJS 演示代码</title>
<script>
onload=function(){
b.style.display="none";
a.onmouseenter=function(){
b.style.display="block";
};
a.onmouseleave = function(){
b.style.display="none";
};
};
</script>
</head>
<body>
<div id="a">aaaa
<div id="b">
bbbb
</div>
</div>
</body>
</html>