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
  • 相关阅读:
    [原]小巧的刀片
    [原]看康震教授讲《卖油翁》有感
    [原]使用可传输表空间修改Schema Name
    [原]ORA00060: Deadlock detected(场景1:单表并发更新)
    [原]使用wget/curl做个“小后门”
    [原]一个空格导致NFS的Readonly
    [转]设计高效SQL: 一种视觉的方法
    [原]6Gb/s SAS 2.0 通道的确不错
    ESX 4/VSphere CentOS 启动时 udev Hang 住
    [摘]终于找到一个有助理解left/right/full outer join的例子
  • 原文地址:https://www.cnblogs.com/zhangwensi/p/10217137.html
Copyright © 2011-2022 走看看