第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

無法使用 Ajax 調(diào)用更新數(shù)據(jù)表的正文

無法使用 Ajax 調(diào)用更新數(shù)據(jù)表的正文

我有一個(gè) DataTable,我試圖通過 ajax 調(diào)用加載數(shù)據(jù),但第一行數(shù)據(jù)總是說:“表中無可用數(shù)據(jù)”但是在它下面包含了加載的ajax數(shù)據(jù)。如何刪除無數(shù)據(jù)線并將ajax數(shù)據(jù)加載到該位置?代碼如下:<div class="box-body">  <table id="changeTicketsTable" class="table table-bordered table-striped">    <thead>      <tr>        <th>Ticket Number</th>        <th>Description</th>        <th>Risk</th>        <th>Primary CI</th>        <th>State</th>        <th>Planned Start Date</th>        <th>Actual Start Date</th>        <th>Actual End Date</th>        <th>Affected Partners</th>      </tr>    </thead>    <tbody>      </tbody>    <tfoot>      <tr>        <th>Ticket Number</th>        <th>Description</th>        <th>Risk</th>        <th>Primary CI</th>        <th>State</th>        <th>Planned Start Date</th>        <th>Actual Start Date</th>        <th>Actual End Date</th>        <th>Affected Partners</th>      </tr>    </tfoot>  </table></div>數(shù)據(jù)表的實(shí)現(xiàn):<script>    getChangeTicketInformation();    $('#changeTicketsTable').DataTable({      "pageLength": 5,      'paging'      : true,      'lengthChange': true,      'searching'   : false,      'ordering'    : true,      'info'        : true,      'autoWidth'   : false    });  })</script>用于進(jìn)行 Ajax 調(diào)用的 Javascript:function getChangeTicketInformation(){  $.ajax({     type: "GET",     url: "../../get_change_ticket_info",      success: function(data) {        $.each(data, function (i, item) {         $('#changeTicketsTable').find('tbody').append(            '<tr>' +            '<td>' + item.number + '</td>' +            '<td>' + item.short_description + '</td>' +            '<td>' + item.risk + '</td>' +            '<td>' + item.cmdb_ci_display_value + '</td>' +            '<td>' + item.state + '</td>' +            '<td>' + item.start_date + '</td>' +            '<td>' + item.work_start + '</td>' +            '<td>' + item.work_end + '</td>' +            '<td>' + 'FILL IN' + '</td>'            + '</tr>');        });      }    });}
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 107 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)