<script>
function Menu_Init(obj){
var tds = obj.getElementsByTagName("td");
for (var i = 0; i < tds.length; i++)
{
if (tds[i].className == "MenuOptions")
{
tds[i].onmouseover = switch_bg;
tds[i].onmouseout = switch_bg;
}
}
}
function switch_bg(e){
if (this.className=="MenuOptions_click") return
this.className = (this.className == "MenuOptions") ? "MenuOptions_hilite" : "MenuOptions";
}
</script>
<style>
.MenuOptions{
padding:2px;
cursor:hand;
color:#000000;
}
.MenuOptions_hilite{
padding:1px;
border:outset 1px #669999;
cursor:hand;
color:#000000;
}
</style>
<table id=MenuTools border="0" cellspacing="2" style="border:1px solid #000000;color:#000000;font-size:12px">
<tr>
<td class="MenuOptions" >大家好呀
<td class="MenuOptions" >很容易实现的效果
<td class="MenuOptions" >喜欢的就拿去用吧
<td >这个不允许加亮
</tr>
</table>
<script>Menu_Init(MenuTools)</script>
function Menu_Init(obj){
var tds = obj.getElementsByTagName("td");
for (var i = 0; i < tds.length; i++)
{
if (tds[i].className == "MenuOptions")
{
tds[i].onmouseover = switch_bg;
tds[i].onmouseout = switch_bg;
}
}
}
function switch_bg(e){
if (this.className=="MenuOptions_click") return
this.className = (this.className == "MenuOptions") ? "MenuOptions_hilite" : "MenuOptions";
}
</script>
<style>
.MenuOptions{
padding:2px;
cursor:hand;
color:#000000;
}
.MenuOptions_hilite{
padding:1px;
border:outset 1px #669999;
cursor:hand;
color:#000000;
}
</style>
<table id=MenuTools border="0" cellspacing="2" style="border:1px solid #000000;color:#000000;font-size:12px">
<tr>
<td class="MenuOptions" >大家好呀
<td class="MenuOptions" >很容易实现的效果
<td class="MenuOptions" >喜欢的就拿去用吧
<td >这个不允许加亮
</tr>
</table>
<script>Menu_Init(MenuTools)</script>
标签:
TD,加亮效果.
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“一个很简单的办法实现TD的加亮效果.”评论...