码迷,mamicode.com
首页 > 其他好文 > 详细

xxx

时间:2019-01-03 22:39:03      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:修改   charset   query   https   text   asc   round   tran   containe   

<!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="width: 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="width: 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="width: 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="width: 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="width: 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>

xxx

标签:修改   charset   query   https   text   asc   round   tran   containe   

原文地址:https://www.cnblogs.com/zhangwensi/p/10217137.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!