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
Release: 2016-06-24 12:30:37
Original
867 people have browsed it

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

Related labels:
source:php.cn
Previous article:Jemin's div css test file_html/css_WEB-ITnose Next article:div css is better than table! _html/css_WEB-ITnose
Statement of this Website
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template