读书人

容易的鼠标滑动效果

发布时间: 2012-08-30 09:55:54 作者: rapoo

简单的鼠标滑动效果
<html>

<head>

<title>changecolor</title>

</head>

<body>
<div style="width:200px;height:100px;background:maroon;"
onmouseover="changeColor('maroon')">蓝色</div>
<div style="width:200px;height:100px;background:red;"
onmouseover="changeColor('red')">红色</div>
<div style="width:200px;height:100px;background:yellow"
onmouseover="changeColor('yellow')">黄色</div>

</body>

<script language="javascript" type="text/javascript">
function changeColor(op){
document.bgColor = op;
}
</script>
</html>

读书人网 >Web前端

热点推荐