Table from url怎么用
我刚开始学习,想做个table,原始的方法是下面这样:
<table data-toggle="table" data-url="data1.json" data-cache="false" data-height="299" class="table table-striped table-bordered table-condensed table-hover table-responsive" style="text-align: center" id="rqgztable">
<input type="hidden" id="agencyListSize" name="agencyListSize" value="${rqgzListSize }" ></input>
<thead>
<tr><th class="text-center" width="5%">序号</th>
<!-- <th class="text-center" width="4%"></th> -->
<th class="text-center">被告知人姓名</th>
<th class="text-center">被告知人单位</th>
<th class="text-center">被告知人职务</th>
<th class="text-center">告知人姓名</th>
<th class="text-center">告知人职务</th>
<th class="text-center ">告知时间</th>
<th class="text-center">其他资料</th></tr>
</thead>
<tbody>
<c:forEach items="${rqgzList }" var="rqgz" varStatus="status">
<tr>
<td>${ status.index+1 }</td>
<!-- <td><i class="fa fa-square-o"></i></td> -->
<td>${ rqgz.bname }</td>
<td>${ rqgz.bdanwei }</td>
<td>${ rqgz.bzhiwu }</td>
<td>${ rqgz.gname }</td>
<td>${ rqgz.gzhiwu }</td>
<td>${ rqgz.gzdate }</td>
<td>${ rqgz.achivement }</td>
</c:forEach>
</tbody>
<div id="pagination" class="pagination"></div>
</table>
后来看到这样的代码
<table data-toggle="table"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/">
<thead>
<tr>
<th data-field="name">Name</th>
<th data-field="stargazers_count">Stars</th>
<th data-field="forks_count">Forks</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
我就想知道,这个url是怎么用的,我怎么样才能把后台的数据放到前台,用这样的方式展示呢
<table data-toggle="table" data-url="data1.json" data-cache="false" data-height="299" class="table table-striped table-bordered table-condensed table-hover table-responsive" style="text-align: center" id="rqgztable">
<input type="hidden" id="agencyListSize" name="agencyListSize" value="${rqgzListSize }" ></input>
<thead>
<tr><th class="text-center" width="5%">序号</th>
<!-- <th class="text-center" width="4%"></th> -->
<th class="text-center">被告知人姓名</th>
<th class="text-center">被告知人单位</th>
<th class="text-center">被告知人职务</th>
<th class="text-center">告知人姓名</th>
<th class="text-center">告知人职务</th>
<th class="text-center ">告知时间</th>
<th class="text-center">其他资料</th></tr>
</thead>
<tbody>
<c:forEach items="${rqgzList }" var="rqgz" varStatus="status">
<tr>
<td>${ status.index+1 }</td>
<!-- <td><i class="fa fa-square-o"></i></td> -->
<td>${ rqgz.bname }</td>
<td>${ rqgz.bdanwei }</td>
<td>${ rqgz.bzhiwu }</td>
<td>${ rqgz.gname }</td>
<td>${ rqgz.gzhiwu }</td>
<td>${ rqgz.gzdate }</td>
<td>${ rqgz.achivement }</td>
</c:forEach>
</tbody>
<div id="pagination" class="pagination"></div>
</table>
后来看到这样的代码
<table data-toggle="table"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/">
<thead>
<tr>
<th data-field="name">Name</th>
<th data-field="stargazers_count">Stars</th>
<th data-field="forks_count">Forks</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
我就想知道,这个url是怎么用的,我怎么样才能把后台的数据放到前台,用这样的方式展示呢
0 个回复