网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 多层层显示js
范文
    多层层显示js
    多层层显示js<!doctype html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
    <html xmlns=http://www.w3.org/1999/xhtml>
    <head>
    <meta http-equiv=content-type content=text/html; charset=gb2312 />
    <title>多层层显示js</title>
    </head>
    <script language=javascript>
    function showdiv(i)
    {
    document.getelementbyid(tag1).style.display=none;
    document.getelementbyid(tag2).style.display=none;
    document.getelementbyid(tag3).style.display=none;
    document.getelementbyid(tag4).style.display=none;
    document.getelementbyid(tag+i).style.display=;
    }function showdiv2(i,allnum)
    {
    for(temp=1;temp<allnum+1;temp++)
    {
    if (temp==i){document.getelementbyid(tag+temp).style.display=;}else{document.getelementbyid(tag+temp).style.display=none;}
    }
    }
    </script>
    <body>
    <a href=# onmouseover=showdiv(1);>1</a>
    <a href=# onmouseover=showdiv(2);>2</a>
    <a href=# onmouseover=showdiv(3);>3</a>
    <a href=# onmouseover=showdiv(4);>4</a>
    <div id=tag1 >测试1</div>
    <div id=tag2 style=display:none;>测试2</div>
    <div id=tag3 style=display:none;>测试3</div>
    <div id=tag4 style=display:none;>测试4</div>
    <br />
    <a href=# onmouseover=showdiv2(1,4);>1</a>
    <a href=# onmouseover=showdiv2(2,4);>2</a>
    <a href=# onmouseover=showdiv2(3,4);>3</a>
    <a href=# onmouseover=showdiv2(4,4);>4</a>
    </body>
    </html>
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/24 5:25:31