Home >Web Front-end >HTML Tutorial >js div css implements tab function_html/css_WEB-ITnose

js div css implements tab function_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:30:37863browse

Code




无标题文档





<script> <br> <br> <br>/*第一种形式 第二种形式 更换显示样式*/ <br>function setTab(name,cursel,n){ <br>for(i=1;i<=n;i ){ <br />var menu=document.getElementById(name i); <br />var con=document.getElementById("con_" name "_" i); <br />menu.className=i==cursel?"hover":""; <br />con.style.display=i==cursel?"block":"none"; <br />} <br />} <br /></script>






    新闻1
    新闻2




新闻列表1

新闻列表2






新闻1 新闻2

新闻列表1

新闻列表2

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
Previous article:Jemin's div css test file_html/css_WEB-ITnoseNext article:Jemin's div css test file_html/css_WEB-ITnose

Related articles

See more