高亮代码
var theObj;
function hoverIt(obj) {
if (theObj != null) {
theObj.style.background = "#fff";
}
if (theObj = obj) {
obj.style.background = "red";
}
}
HTML代码
菜单一
菜单二
菜单三
菜单四
Done!