我是新手,能帮我看看下面代码能不能优化,哪里不要改的.
随便说两句也成.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>导航</title><style>
<!--
.start {
background-color:gray;
    color:#CC0000;
  font-family:"宋体";
over:expression(onmouseover=function(){if(this.className!='click')this.className='over'});
out:expression(onmouseout=function(){if(this.className=='over')this.className='out'});
}
.click {
background-color:#0FF;
color:#CC0000;
}
.over{
background-color:#3CF;
color:#CC0000;
}
.out{
background-color:gray;
color:#CC0000;
  font-family:"宋体";
}
-->
</style>
</head>
<script language="javascript">
function tag(obj) {
var o = document.getElementById(obj.id);
o.className=(o.className=="click"?"over":"click");
//alert("请帮忙实现功能,记录当前的表格改变成click样式,还原其他的表格为start样式.");
for( var i=1; i<=5; i++) {
var tag = "td"+i;
if( obj.id != tag) {
document.getElementById(tag).className="start";
}
}

}
</script>
<body>
<table id="table" class="table"  width="300" border="1" align="center">
  <tr id="tr">
    <td width="20%" id="td1" class="start" onclick="javascript:tag(this)">菜单1</td>
    <td width="20%" id="td2" class="start" onclick="javascript:tag(this)">菜单2</td>
    <td width="20%" id="td3" class="start" onclick="javascript:tag(this)">菜单3</td>
    <td width="20%" id="td4" class="start" onclick="javascript:tag(this)">菜单4</td>
    <td width="20%" id="td5" class="start" onclick="javascript:tag(this)">菜单5</td>
  </tr>
</table>
</body>
</html>