我有一个名为response
. 这是来自 ajax 调用的响应。该变量具有以下内容:
<table id="ListCompanies" class="zebra-striped">
<thead>
<tr>
<th>Nom de la societe</th>
<th>Ville</th>
<th>Rue</th>
<th width="70"><a class="btn primary small createCompany" href="/PLATON/Admin/Company/Create">[+] Nouvelle societe</a> </th>
</tr>
</thead>
<tbody>
<tr id="13">
<td>INDUSTRIAL DEFENDER INC</td>
<td>FOXBOROUGH</td>
<td>Chestnut Street</td>
<td nowrap>
<a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/13" id="13">Modifier</a>
<a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/13" id="13">Supprimer</a>
</td>
</tr>
<tr id="14">
<td>INC CRANE NUCLEAR</td>
<td>GEORGIA KENNESAW</td>
<td>cobb International Blvd</td>
<td nowrap>
<a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/14" id="14">Modifier</a>
<a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/14" id="14">Supprimer</a>
</td>
</tr>
</tbody>
</table>
<a href="/PLATON/Admin/Company/RowsList?page=3" id="LoadMoreLink">Load more</a>
alert($("tbody", response).html());
给我:
<tr id="13">
<td>INDUSTRIAL DEFENDER INC</td>
<td>FOXBOROUGH</td>
<td>Chestnut Street</td>
<td nowrap>
<a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/13" id="13">Modifier</a>
<a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/13" id="13">Supprimer</a>
</td>
</tr>
<tr id="14">
<td>INC CRANE NUCLEAR</td>
<td>GEORGIA KENNESAW</td>
<td>cobb International Blvd</td>
<td nowrap>
<a class="btn small editCompany" href="/PLATON/Admin/Company/Edit/14" id="14">Modifier</a>
<a class="btn small deleteCompany" href="/PLATON/Admin/Company/Delete/14" id="14">Supprimer</a>
</td>
</tr>
没关系对我来说。
如何#LoadMoreLink
从响应变量中获取底部的链接?
我试过:
alert($("#LoadMoreLink",response));
但它没有用。