<style>
.red A:link,.red A:visited,.red A:active{color:red}
</style>
<table id=menu>
<tr>
<td class="red"> <a href="index.htm"> 首页 </a> </td>
<td> <a href="index1.htm"> 菜单一 </a> </td>
<td> <a href="index2.htm"> 菜单二 </a> </td>
<td> <a href="index3.htm"> 菜单三 </a> </td>
<td> <a href="index4.htm"> 菜单四 </a> </td>
<td> <a href="index5.htm"> 菜单五 </a> </td>
</tr>
</table>
<script language="javascript">
<!-- 导航菜单-自动对应样式
onload=function(){
var sa=location.href;
var obj=document.getElementById("menu").getElementsByTagName("td"),j=obj.length
for (var i=0;i <j;i++)
if (sa.indexOf(obj[i].getElementsByTagName("a")[0].href)!=-1)obj[i].className="red"
else obj[i].className=""
}
//-->
</script>