87,997
社区成员




#target-div:hover{
background-color:black;
text-decoration:underline;
display:block;
padding:10px;
}
<head>
<title></title>
<script type="text/javascript">
function MouseUp() {
var div = document.getElementById("div");
div.style.background = "Red";
}
function MouseLeft() {
var div = document.getElementById("div");
div.style.background = "Gray";
}
</script>
</head>
<body>
<div style=" width:50px; height:20px; background-color:Gray" onmouseover="MouseUp()" onmouseout ="MouseLeft()" id="div">
<a href="http://www.baidu.com">百度</a>
</div>
</body>
</html>