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

请输入您要查询的考试资料:

 

标题 多层层显示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">测试2</div>
    <div id="tag3">测试3</div>
    <div id="tag4">测试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/21 7:40:41