鼠标触及带边框菜单

鼠标触及带边框菜单

发布: admin | 类别: 前端设计 | 点击:1812 | 更新时间:2009-06-29 14:02:33

0 条评论

<html>
<head>
<title>鼠标触及带边框菜单</title>
</head><body>
<!--将以下代码加入HTML的<Body></Body>之间-->
<style>
.menulines{
border:1px solid white;
}

.menulines a{
text-decoration:none;
color:red;
}
</style>
<script language="JavaScript1.2">
function borderize(what,color){
what.style.borderColor=color
}

function borderize_on(e){
if (document.all)
source3=event.srcElement
else if (document.getElementById)
source3=e.target
if (source3.className=="menulines"){
borderize(source3,"black")
}
else{
while(source3.tagName!="TABLE"){
source3=document.getElementById? source3.parentNode : source3.parentElement
if (source3.className=="menulines")
borderize(source3,"black")
}
}
}

function borderize_off(e){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menulines")
borderize(source4,"white")
else{
while(source4.tagName!="TABLE"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menulines")
borderize(source4,"white")
}
}
}

</script>
<table border="0" width="150" cellspacing="0" cellpadding="0" onMouseover="borderize_on(event)" onMouseout="borderize_off(event)" height="95">
<tr><td width="100%" bgcolor="#E6E6E6" height="13"><b><font size="2">导航菜单</font></b></td></tr>
<tr><td width="100%" class="menulines" height="14"><a href="http://www.chinaz.com"><font face="宋体" size="2">中国站长站</font></a></td></tr>
<tr><td width="100%" class="menulines" height="14"><a href="http://bbs.chinaz.com"><font face="宋体" size="2">站长论坛</font></a></td></tr>
<tr><td width="100%" class="menulines" height="14"><a href="http://sc.chinaz.com"><font face="宋体" size="2">网页模版</font></a></td></tr>
<tr><td width="100%" class="menulines" height="14"><a href="http://down.chinaz.com"><font face="宋体" size="2">源码下载</font></a></td></tr>
<tr><td width="100%" class="menulines" height="14"><a href="#"><font face="宋体" size="2">平面设计</font></a></td></tr>
</table>
</body></html>

关键字 :前端设计 js

0 条评论

 

欢迎留下您的评论

红框选项必须输入,不允许html代码。

联系我们

  • 电话: 18908191278 028-61408608
  • 网址: www.drawnet.cn
  • QQ: 464410235
  • 微信: 464410235
  • 邮箱: master@drawnet.cn

关于我们

关注微信公众号

扫码关注微信服务号

进入微信小程序

扫码进入微信小程序