xxxxxxxxxx
$('#table').bootstrapTable({
url: 'data1.json',
columns: [{
field: 'id',
title: 'Item ID'
}, {
field: 'name',
title: 'Item Name'
}, {
field: 'price',
title: 'Item Price'
}]
})
xxxxxxxxxx
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.js"></script>
<!-- Latest compiled and minified Locales -->
<script src="https://unpkg.com/bootstrap-table@1.18.2/dist/locale/bootstrap-table-zh-CN.min.js"></script>
xxxxxxxxxx
<!-- On tables -->
<table class="table-primary"></table>
<table class="table-secondary"></table>
<table class="table-success"></table>
<table class="table-danger"></table>
<table class="table-warning"></table>
<table class="table-info"></table>
<table class="table-light"></table>
<table class="table-dark"></table>
<!-- On rows -->
<tr class="table-primary"></tr>
<tr class="table-secondary"></tr>
<tr class="table-success"></tr>
<tr class="table-danger"></tr>
<tr class="table-warning"></tr>
<tr class="table-info"></tr>
<tr class="table-light"></tr>
<tr class="table-dark"></tr>
<!-- On cells (`td` or `th`) -->
<tr>
<td class="table-primary"></td>
<td class="table-secondary"></td>
<td class="table-success"></td>
<td class="table-danger"></td>
<td class="table-warning"></td>
<td class="table-info"></td>
<td class="table-light"></td>
<td class="table-dark"></td>
</tr>
xxxxxxxxxx
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
xxxxxxxxxx
<nav class="navbar navbar-light bg-light">
<span class="navbar-text">
Navbar text with an inline element
</span>
</nav>