<form action="" method="get" id="form">
<table>
<tr id="a">
<td>
<input name="aa" value="song" type="text">
<select name="select">
<option value="jian">jian</option>
</select>
</td>
</tr>
<tr id="b">
<td><input name="bb" value="yong" type="text"></td>
</tr>
<tr id="c">
<td><input name="cc" value="按钮" type="button" onclick="test();"></td>
</tr>
</table>
</form>
传递整个表单参数代码:
$.post(url, $('#form').serialize(), function(resp){
alert(resp);
});
传递表单中id值为a的部分参数代码:
$.post(url, $('#a input,#a select').serialize(), function(resp){
alert(resp);
});