引导表-->;通过Ajax ajaxRequest获取数据
我想使用引导表库 我希望通过ajax向表提供数据 我有以下代码:引导表-->;通过Ajax ajaxRequest获取数据,ajax,Ajax,我想使用引导表库 我希望通过ajax向表提供数据 我有以下代码: <table id="table" class="table text-center" data-toggle="table" data-ajax="ajaxRequest"
<table id="table" class="table text-center"
data-toggle="table"
data-ajax="ajaxRequest"
data-search="true"
data-show-refresh= "true"
data-show-export="true"
data-side-pagination="server"
data-pagination="true">
<thead>
<tr>
<th data-field="ID_Persona" >Responsable</th>
<th data-field="Nombre" >Sección</th>
<th data-field="ID_Responsable" >Prog.</th>
<th data-field="Responsable" >Realizado</th>
<th data-field="Prog" >%</th>
</tr>
</thead>
</table>
责任的
塞西翁
掠夺。
实现
%
剧本
<script>
function ajaxRequest(params) {
$.ajax({
url: "nombre_api",
type: "POST",
dataType: "json",
success: function(result){
console.log('ajax.success: ', result);
params.success({
});
},
error: function(er){
console.log(er)
}
});}</script>
函数ajaxRequest(参数){
$.ajax({
url:“nombre_api”,
类型:“POST”,
数据类型:“json”,
成功:功能(结果){
log('ajax.success:',result);
参数成功({
});
},
错误:函数(er){
控制台日志(er)
}
});}