为了账号安全,请及时绑定邮箱和手机立即绑定

过滤器不适用于 html 表中的多个下拉列表

过滤器不适用于 html 表中的多个下拉列表

扬帆大鱼 2021-10-14 16:35:34
我正在为表格创建一个下拉过滤器,并为每一列设置一个下拉过滤器。但是第一列上唯一的过滤器正在工作,过滤器的其余部分不起作用,当我尝试过滤它们时,列中的元素消失了。<head><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"><style>  .bodycontent{    margin-left: 5%;    margin-right:5%;  }  td{    padding:10px;    text-align:center;  }</style></head><body >    <div class="bodycontent"><table id="table_format" class="table table-striped ">                    <thead style="background-color: #70AD47">                        <tr>                            <th>Category                              <select id="filterText" style="display:inline-block;" onchange="filterText()">                              <option disabled selected>Select</option>                              <option value="all">All</option>                              <option value="School Nutrition">School Nutrition</option>                              <option value="Food Safety">Food Safety</option>                            </select>                            </th>                            <th>Course Title</th>                            <th>Hours of Instruction                             <select id="filterText" style="display:inline-block;" onchange="filterText()">                              <option disabled selected>Select</option>                              <option value="all">All</option>                              <option value="one">1</option>                              <option value="two">2</option>                              <option value="three">3</option>                            </select>                            </th>是否可以让过滤器适用于所有列?也可以多个过滤器同时工作。
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 156 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信