0
以下の表で、クリック機能(removeRow)で、テキストボックス(txtTotalAmount)の値を取得します。td入力テキストボックス値の取得方法は?
私はここに、この
function removeRow(name) {
$(name).parent().parent().remove();
var total = $(name).parent().parent().siblings().find("input .classTotalAmount").val();
alert(total);// shows only undefined in alert box
}
を書いた私のテーブルには、どのテーブル
<table id="tblitems" cellpadding="0" cellspacing="0" border="0" class="additemtb">
<tbody>
<tr>
<th>Item Name</th>
<th>Item Code</th>
<th>Unit Price</th>
<th>Qty</th>
<th>UOM</th>
<th>Amount</th>
<th>Minimal Order Qty</th>
<th>FOC</th>
<th></th>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td style="width:90px;">
<a href="javascript:void(0)" class="copy" onclick="copyRow(this);">Copy</a>
<a href="javascript:void(0)" class="delete" onclick="removeRow(this);">delete</a>
<a href="javascript:void(0)" class="add" onclick="addRows(this)">add</a>
</td>
</tr>
<tr>
<td></td>
<td >Total Amount</td>
<td>
<asp:TextBox ID="txtTotalAmount" CssClass="classTotalAmount number" Columns="8" runat="server" ></asp:TextBox>
<asp:Label ID="Label2" runat="server" CssClass="classCurrency3" />
</td>
<td> </td>
</tr>
</tbody>
</table>
のですか? htmlコードを入れる – robasta