Home  >  Article  >  Web Front-end  >  JS implementation of switching tab page effect example code_javascript skills

JS implementation of switching tab page effect example code_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:18:071204browse

在网页区添加以下代码

复制代码 代码如下:



在网页区添加以下代码
复制代码 代码如下:

 
 
 

新闻排行

 

国内

 

国际

 

社会

 

网评

 
 
 
<스크립트> 
var Tags=document.getElementById('NewsTop_tit').getElementsByTagName('p'); 
var TagsCnt=document.getElementById('NewsTop_cnt').getElementsByTagName('span'); 
var len=Tags.length; 
var flag=1;//修改默认值 
for(i=1;iTags[i].value = i; 
태그[i].onmouseover=function(){changeNav(this.value)}; 
TagsCnt[i].className='undis'; 

태그[flag].className='topC1'; 
TagsCnt[flag].className='dis'; 
함수 변경Nav(v){ 
태그[flag].className='topC0'; 
TagsCnt[flag].className='undis'; 
플래그=v; 
태그[v].className='topC1'; 
TagsCnt[v].className='dis'; 

 
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn