<script> <BR>var Tags=document.getElementById('NewsTop_tit').getElementsByTagName('p'); <BR>var TagsCnt=document.getElementById('NewsTop_cnt').getElementsByTagName('span'); <BR>var len=Tags.length; <BR>var flag=1;//修改默认值 <BR>for(i=1;i<len;i++){ <BR>Tags[i].value = i; <BR>Tags[i].onmouseover=function(){changeNav(this.value)}; <BR>TagsCnt[i].className='undis'; <BR>} <BR>Tags[flag].className='topC1'; <BR>TagsCnt[flag].className='dis'; <BR>function changeNav(v){ <BR>Tags[flag].className='topC0'; <BR>TagsCnt[flag].className='undis'; <BR>flag=v; <BR>Tags[v].className='topC1'; <BR>TagsCnt[v].className='dis'; <BR>} <BR></script>