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";
}
Menu_Init(obj) is used to initialize Table.
Required CSS
Copy code
}
.MenuOptions_hilite{
padding:1px ;
border:outset 1px #669999;
cursor:hand;
color:#000000;
}
table demonstration
Copy code
The code is as follows:
Demo