28,409
社区成员




<html>
<head>
<title>Simple Menu Demo</title>
<script type="text/javascript">
var defaultClassName="m1";
var hoverClassName="m2";
function _hover(isHover,defaultMenu,evt){
var eventSrc=window.event?event.srcElement:evt.target;
var currentMenu=$(defaultMenu);
setTimeout(function(){
if(isHover==true){
eventSrc.className=hoverClassName;
if(eventSrc!=currentMenu)
currentMenu.className=defaultClassName;
}else{
if(eventSrc!=currentMenu)
eventSrc.className=defaultClassName;
currentMenu.className=hoverClassName;
}
},100);
}
function $(id)
{
return document.getElementById(id);
}
</script>
<style type="text/css">
.m1{background-color:#EEEEEE;}
.m2{background-color:#222222;}
</style>
</head>
<body>
<table border=0 width="50" cellspacing="0" cellpadding="0">
<tr>
<td class="m2" id="m1" onmouseover="_hover(true,'m1')" onmouseout="_hover(false,'m1')">1</td>
</tr>
<tr>
<td class="m1" id="m2" onmouseover="_hover(true,'m1')" onmouseout="_hover(false,'m1')">2</td>
</tr>
<tr>
<td class="m1" id="m3" onmouseover="_hover(true,'m1')" onmouseout="_hover(false,'m1')">3</td>
</tr>
<tr>
<td class="m1" id="m4" onmouseover="_hover(true,'m1')" onmouseout="_hover(false,'m1')">4</td>
</tr>
</table>
</body>
</html>