日期:2014-05-16 浏览次数:20386 次
<!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" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>关于本站|联系我们</title>
<link href="Css/main.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="Images/b_i.ico" type="image/x-icon"/>
<link rel="bookmark" href="Images/b_i.ico" type="image/x-icon"/>
</head>
<body>
<div class="wrap">
<div class="main">
<div class="logo aLogo"><a class="logo_a" title="设为首页"></a></div>
<div class="bdn">当前位置:
<a href="./">首页</a> >> 关于本站
</div>
<div class="lmu">
<div class="idt">关于本站</div>
<div class="mu" id="mu">
<ul>
<li>关于本站</li>
<li>诚聘英才</li>
<li>联系我们</li>
<li>使用声明</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript" src="JavaScript/footer.js"></script>
</div>
</body>
</html>
document.getElementById("mu").onclick = function(e){
e = e
------解决方案--------------------
window.event;
var target = e.srcElement
------解决方案--------------------
e.target,
tagName = target.tagName.toLowerCase(),
allLi = document.getElementById("mu").getElementsByTagName("li");
for(var i=0,len=allLi.length;i<len;i++){
if(target == allLi[i]){
allLi[i].style.background = "red";
}else{
allLi[i].style.background = "blue";
}
}
};
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&g