本帖最后由 追寻Dream 于 2013-10-20 16:30 编辑
<!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=utf-8" />
<title>无标题文档</title>
<style type="text/css">
h1{background:blue;}
.blue{ background:red;}
</style>
<script type="text/javascript">
window.onload=function(){
var main=document.getElementById('main');{
main.onmouseover=function(){
this.className="blue";
}
main.onmousemove=function(){
this.className="";
}
}
}
</script>
</head>
<body >
<h1 id="main">网站导航</h1>
</body>
</html>
怎么实现不了动态交互功能,求指导?
|
|