|
|
<%@page language="java" contentType="text/html;charset=utf-8" %>
|
|
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
<div id="breadcrumb">
|
|
|
<a href="#" title="Go to Home" class="tip-bottom"><i
|
|
|
class="icon-home"></i> Home</a> <a href="#" class="current">Tables</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
|
<div class="widget-box">
|
|
|
<div class="widget-title">
|
|
|
|
|
|
<h5>Dynamic table</h5>
|
|
|
</div>
|
|
|
<div class="widget-content nopadding">
|
|
|
<div class="widget-title" style="height: 53px;">
|
|
|
<div>
|
|
|
<div class="form-inline" role="form" id="inBoxQueryDiv"
|
|
|
style=" margin-top: 12px;margin-left: 25px;float: left;">
|
|
|
<div class="input-group" style="float: left;">
|
|
|
<span class="input-group-addon">IP:</span>
|
|
|
<input type="text" id="" class="form-control" placeholder=""/>
|
|
|
</div>
|
|
|
<div class="input-group" style="float: left;">
|
|
|
<span class="input-group-addon">IP:</span>
|
|
|
<input type="text" id="" class="form-control" placeholder=""/>
|
|
|
</div>
|
|
|
<button id="submit" class="btn btn-default">搜索</button>
|
|
|
</div>
|
|
|
<button id="addBtn" class="btn btn-primary" style="margin-top: 12px;margin-left: 900px;">新增</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="table">
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<script>
|
|
|
$(function () {
|
|
|
var data = [];
|
|
|
for (var i = 0; i < 20; i++) {
|
|
|
data.push({
|
|
|
userId: i,
|
|
|
userName: "用户" + i,
|
|
|
status: i % 3 == 0 ? 0 : 1
|
|
|
});
|
|
|
}
|
|
|
$("#table").table({
|
|
|
striped: true,
|
|
|
panelClass: "panel-success",
|
|
|
pagination: true,
|
|
|
columns: [{
|
|
|
title: "用户id",
|
|
|
field: "userId"
|
|
|
}, {
|
|
|
title: "用户名称",
|
|
|
field: "userName"
|
|
|
}, {
|
|
|
title: "状态",
|
|
|
field: "status"
|
|
|
}],
|
|
|
data: data
|
|
|
});
|
|
|
});
|
|
|
</script> |
...
|
...
|
|