div hover问题,在线等
发布网友
发布时间:2022-04-22 04:39
我来回答
共1个回答
热心网友
时间:2022-04-22 06:08
JS做的
<!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>无标题文档</title>
</head>
<body>
<script type="text/javascript">
function mouseOver(o)
{
o.style.background ="#00FFFF"
}
function mouseOut(o)
{
o.style.background ="none"
}
</script>
<div onmouseover="mouseOver(this)" onmouseout="mouseOut(this)" style="width:100px; height:30px; line-height:30px;">家庭日记</div>
</body>
</html>