zoukankan      html  css  js  c++  java
  • javascript

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>

    <style type="text/css">

    *{
    margin: 0;
    padding: 0;
    }
    li{
    list-style:none;
    }
    .the{
    303px;
    height: 32px;
    border-right: 1px red solid;

    }
    .the li{
    100px;
    height: 30px;
    border: 1px red solid;
    border-right: none;
    float: left;
    line-height: 30px;
    text-align: center;
    }
    .tab li{
    302px;
    height: 300px;
    border: 1px red solid;
    line-height: 300px;
    text-align: center;
    border-top: none;

    }
    .tab{
    302px;
    height: 300px;

    }
    .one{
    303px;
    height: 404px;
    margin: 0 auto;
    }


    </style>
    </head>
    <body>
    <div class="one">
    <ul class="the">
    <li>a</li>
    <li>b</li>
    <li>c</li>
    </ul>
    <ul class="tab">
    <li bgcolor="red">a</li>
    <li style="display:none" bgcolor="green">b</li>
    <li style="display:none" bgcolor="pink">c</li>
    </ul>
    </div>
    <script type="text/javascript">
    var eItemList=document.querySelectorAll(".the li"),
    eContentList=document.querySelectorAll(".tab li");


    for(var i=0;i<eItemList.length;i++){
    eItemList[i].index=i;
    eItemList[i].style.background="greem";

    eItemList[i].onmouseover=function(){
    //console.log(this.index);
    for(var i=0;i<eContentList.length;i++){
    //eContentList[i].style.background="red";
    eContentList[i].style.display="none";
    eItemList[i].style.background="none";
    eContentList[i].style.background="none";
    }
    eContentList[this.index].style.display="block";
    eItemList[this.index].style.background="green";
    eContentList[1].style.background="pink";
    eContentList[0].style.background="green";
    eContentList[2].style.background="red";
    }

    //mouseout

    };

    </script>
    <script type="text/javascript" src="wen.js"></script>
    </body>
    </html>

  • 相关阅读:
    centos6下安装部署hadoop2.2
    centos 卸载自带的 java
    完全分布式Hadoop2.3安装与配置
    hadoop安装与WordCount例子
    CentOS 6.5 下载地址
    碎片化
    DRM加密技术是怎么一回事
    DRM你又赢了:其API纳入HTML5标准
    java 对视频和图片进行加密解密
    HadoopDB:混合分布式系统
  • 原文地址:https://www.cnblogs.com/qq547372511/p/5866260.html
Copyright © 2011-2022 走看看