<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=GBK"/>
<title>3s改变背景色</title>
<script type="text/javascript">
var div1=document.getElementById('div1');
var chg=function()
{
div1.style.background="black";
}
</script>
</head>
<body>
<div id="div1" style="width: 100px;height: 30px;background-color: red;"
onmouseover=window.setTimeout("chg();",3000)></div>
</body>
</html>
一共有三个问题,结合代码看,这是我测试过的