【问题标题】:show bootstrap table with data-checkbox already checked显示已选中数据复选框的引导表
【发布时间】:2017-01-19 11:14:08
【问题描述】:

如何显示已选中 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>

【问题讨论】:

  • 在哪里?在引导表选项中?

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


【解决方案1】:

下面的示例显示了使用checked 选中的复选框

<!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>

【讨论】:

  • 感谢您的回答,但这不是我所需要的,我需要在引导表中提供一个选项,以便在显示表格时选中所有复选框。
猜你喜欢
  • 2023-03-05
  • 2019-12-31
  • 2018-11-14
  • 1970-01-01
  • 1970-01-01
  • 2018-10-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多