0

如何使用jsonp服务回调对带有参数的表头进行排序?

url 参数:adServerId,advertiserId,campaignId,startDate,endDate,active,inactive,sortBy,start,limit

我的html代码:

`<table id="adcampaignGrid" class="grid" onclick="sort()">
<tr>
   <thead>
   <th>Ad Server Id</th>
    <th>Advertiser Id</th>
    <th>Advertiser Name</th>
  <tr>
 </table>`

我的 jQuery 代码:

$.each(data.response.docs, function (i,  item) { // json is the name of the object
        var row = $("<tr></tr>");
        row.append('<td>' + item.adServerId + '</td>'); //item is named at the opening of this $.each function
        row.append('<td>' + item.advertiserId + '</td>');
        row.append('<td>' + item.advertiserName + '</td>');
        row.append('<td>' + item.campaignId + '</td>');
        $("#adcampaignGrid").append(row);
4

0 回答 0