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
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn