1
您好我有两行 像:克隆表行
<tr>
<td>
<%:Html.Label("Name")%>
<%:Html.TextBoxFor(model=>model.Name)%>
</td>
</tr>
<tr>
<td>
<%:Html.Label("Age")%>
<%:Html.TextBoxFor(model=>model.Age)%>
</td>
</tr>
我应该如何克隆这些两行和最后一行完成后添加。 我想是这样的:
$("#" + tableId + "tbody")
.clone(true)
.insertAfter("#" + tableId + " tr:last");
$('#' + tableId + ' tbody:first>tr:last>td:last')
.empty()
.append("<input type=\"image\" id=\"imgDelete\" name=\"delete\" alt='' class=\"delete\" onclick='DeleteTableRow(this)' />");
哇请编辑这使它有点可读... – Matt 2011-03-14 12:15:12
你想在服务器端或客户端添加行吗?你要做的是在客户端使用jQuery。如果服务器端可以使用asp.net mvc helper。 – CallMeLaNN 2011-03-14 18:48:35