0
1:我加载表onclick
如下:如何获得表值使用jQuery,运行PHP函数,则追加结果表
$(document).ready(function() {
$("#myTable").tablesorter();
$("#ajax-append").click(function() {
$.get("get_data.php", function(html) {
$("#myTable tbody").append(html);
$("#myTable").trigger("update");
});
return false;
});
});
2:表中填充三列如下:
<table id="myTable">
<thead>
<tr>
<th class="header">header 1</th>
<th class="header">header 2</th>
<th class="header">header 3</th>
</tr>
</thead>
<tbody>
<tr>
<td id="col1_1">value 1</td>
<td id="col2_1">value 2</td>
<td id="col3_1"></td>
</tr>
<tr>
<td id="col1_2">value 1</td>
<td id="col2_2">value 2</td>
<td id="col3_2"></td>
</tr>
</tbody>
</table>
...等(行100的...)
- 一旦表加载 - 我想获得COL1的值,并将其传递到一个函数,即/
get_result.php?data=col1
和使用jQuery,并显示在功能运行加载GIF每一行把这个变成col3
整个表...
谁能让我开始我怎么能做到这一点。谢谢!