<tbody id="tbody1">
<tr>
<td style="text-align: center" >1</td>
<td class="auto-style"><input type="checkbox" name="b_id1" style="text-align: center" /></td>
<td ><textarea style="height: 99px; width: 86px" name="name1"></textarea></td>
<td><textarea style="height: 99px; width: 350px" name="number1"></textarea></td>
<td><textarea style="height: 99px; width: 350px" name="price1"></textarea></td>
<td><textarea style="height: 99px; width: 180px" name="sum1"></textarea></td>
<td><textarea style="height: 99px; width: 180px" name="beizhu1"></textarea></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="保 存" />
<br />
</form>
</body>
</html>
后面用a = this.hd.Value;(取出来空)
http://tool.oschina.net/apidocs/apidoc?api=jquery
的serializeArray()方法),把获取的对象转成json串,放到一个也没的隐藏控件中,然后Click事件对应的方法在后台获取这个隐藏控件的值。2中方式看你怎么用咯
array['requestType']=type;//添加请求类型的键值
$.post("AddProductInfo.aspx",array,function(result){//直接把追加值之后的Json数组传过去就好了
//pass
})
这样表单才能把数据提交回去。
其次,动态生成的标签,id和name要注意别重复
最后,提交时要看清楚,不要提交错了表单