<script type="text/javascript" language="javascript">
<!--
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
//本功能非常OK,兼容IE7,FF,IE6;
for(var i=1;i<=7;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';}
//-->
</script>
为什么只能做6个,做成7个他就出错。
<ul>
<li ></li>
<li id="tb_1" class="hovertab" onMouseOver="rmj:HoverLi(1);"><a href="#">1</a></li>
<li ></li>
<li id="tb_2" class="normaltab" onMouseOver="rmj:HoverLi(2);"><a href="#">2</a></li>
<li ></li>
<li id="tb_3" class="normaltab" onMouseOver="rmj:HoverLi(3);"><a href="#">3</a></li>
<li ></li>
<li id="tb_4" class="normaltab" onMouseOver="rmj:HoverLi(4);"><a href="#">4</a></li>
<li ></li>
<li id="tb_5" class="normaltab" onMouseOver="rmj:HoverLi(5);"><a href="#">5</a></li>
<li ></li>
<li id="tb_6" class="normaltab" onMouseOver="rmj:HoverLi(6);"><a href="#">6</a></li>
<li ></li>
<li id="tb_7" class="normaltab" onMouseOver="rmj:HoverLi(7);"><a href="#">7</a></li>
</ul>
这就出错怎么回事