添加下拉表头引导3(Adding dropdown in table head bootstrap

2019-11-03 13:59发布

我想在表头添加下拉,但我得到了在HTML5验证错误,这将是正确的标记?

下面是例子小提琴http://jsfiddle.net/52VtD/9883/

和HTML

 <table class="table">
        <thead>
            <tr>
                <th class="dropdown">
                   <a href="#" data-toggle="dropdown" class="dropdown-toggle">Messages <b class="caret"></b></a>
                   <ul class="dropdown-menu">
                      <li><a href="#">Inbox</a></li>
                      <li><a href="#">Drafts</a></li>
                      <li><a href="#">Sent Items</a></li>
                      <li class="divider"></li>
                      <li><a href="#">Trash</a></li>
                   </ul>
                </th>
                <th>First Name</th>
                <th>Last Name</th>
                <th>Email</th>
            </tr>
        </thead>
</table>
文章来源: Adding dropdown in table head bootstrap 3