显示已经检查了数据复选框的bootstrap表

时间:2017-01-19 11:14:09

标签: jquery html css twitter-bootstrap bootstrap-table

如何显示已检查过data-checkbox的引导程序表?

<div class="fixed-table-body">
    <div class="fixed-table-loading" style="top: 41px; display: none;">Chargement des données...</div>
    <table id="GetSpiAttached"
           data-toggle="table"
           data-url=@Url.Action("GetUser","User")
           data-side-pagination="server"
           data-pagination-next-text="›"
           data-pagination-pre-text="‹"
           data-toolbar="#toolbar">
        <thead>
        <tr>
            <th data-field="Id" data-sortable="true">Code Client</th>
            <th data-field="Nom" data-sortable="true">Nom</th>
            <th data-field="Prenom" data-sortable="true">Prénom</th>
            <th data-field="TitreCivilite" data-sortable="true">Civilité</th>
            <th data-checkbox="true"></th>
        </tr>
        </thead>
    </table>
</div>

enter image description here

1 个答案:

答案 0 :(得分:0)

以下示例使用checked

显示选中的复选框

&#13;
&#13;
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h2>Form control: inline checkbox</h2>
  <p>The form below contains three inline checkboxes:</p>
  <form>
    <label class="checkbox-inline">
      <input type="checkbox" value="" checked>Option 1
    </label>
    <label class="checkbox-inline">
      <input type="checkbox" value="" checked>Option 2
    </label>
    <label class="checkbox-inline">
      <input type="checkbox" value="" checked>Option 3
    </label>
  </form>
</div>

</body>
</html>
&#13;
&#13;
&#13;

相关问题