zoukankan      html  css  js  c++  java
  • xxx

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>测试</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    </head>
    <body>

    <div class="container">
    <div class="row">
    <div>
    <label class="form-inline">参加单位:<input type="text" class="form-control" id="inputValue" placeholder="请输入"/></label>
    <button class="btn btn-primary" onclick="displayDiv()">submit</button>
    </div>

    </div>

    <div class="bs-example" data-example-id="bordered-table">
    <table class="table table-bordered">
    <thead style="background: yellow;" class="hide " id="hideTab">
    <tr>
    <th>班级</th>
    <th>姓名</th>
    <th>英语</th>
    <th style=" 50px;">数学</th>
    </tr>
    </thead>
    </table>
    </div>


    <div class="bs-example" data-example-id="bordered-table">
    <table class="table table-bordered">
    <thead>
    <tr>
    <th>#</th>
    <th>First Name</th>
    <th>Last Name</th>
    <th style=" 50px;">Username</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <th scope="row">1</th>
    <td>Mark</td>
    <td>Otto</td>
    <td style="border: 0px solid transparent;"><button class="btn btn-primary" style=" 50px;">修改</button></td>
    </tr>
    <tr>
    <th scope="row">2</th>
    <td>Jacob</td>
    <td>Thornton</td>
    <td style="border: 0px solid transparent;"><button class="btn btn-primary" style=" 50px;">修改</button></td>
    </tr>
    <tr>
    <th scope="row">3</th>
    <td>Larry</td>
    <td>the Bird</td>
    <td style="border: 0px solid transparent;"><button class="btn btn-primary" style=" 50px;">修改</button></td>
    </tr>
    </tbody>
    </table>
    </div>

    </div>

    <script type="text/javascript">
    function displayDiv() {
    var inputVal = document.getElementById("inputValue").value
    console.log( inputVal)

    if(inputVal=="1"){
    var hideTab = document.getElementById("hideTab");
    hideTab.className = "changedClassName"
    console.log( hideTab.innerHTML)
    }else{
    var hideTab = document.getElementById("hideTab");
    hideTab.className = "hide"
    }

    }
    </script>

    </body>
    </html>

    欢迎对it热情的同学,加qq进行技术讨论; QQ:850922253
  • 相关阅读:
    Train Problem(栈的应用)
    Code obfuscatio (翻译!)
    Milking Cows
    Sorting a Three-Valued Sequence(三值排序)
    Asphalting Roads(翻译!)
    FatMouse' Trade
    Fibonacci Again
    Yogurt factory
    经济节约
    Lucky Conversion(找规律)
  • 原文地址:https://www.cnblogs.com/zhangwensi/p/10217137.html
Copyright © 2011-2022 走看看