在写此篇博文时,发现在以前曾写过《http://www.cnblogs.com/insus/p/5434062.html

但是与此篇所说的完全不一样。这篇Insus.NET需要的是jQuery去获取html table的某一行某一列的数据。

如下表:
jQuery获取Table某列的值

Html code:

<table>
        <tr>
            <th style="width:10px;"><input id="SelectAll" type="checkbox" /></th>
            <th>ID</th>
            <th>费用名目</th>
            <th>费用解释</th>
            <th>收费明细</th>
            <th>币种</th>
            <th style="width:50px;">操作</th>
        </tr>
        @foreach (var m in new HighwayAdditionalChargeEntity().HighwayAdditionalCharges())
            {
            <tr class="trData">
                <td><input id="" class="SelectSingle" type="checkbox" value="@m.HighwayAdditionalCharge_nbr" /></td>
                <td>@m.HighwayAdditionalCharge_nbr</td>
                <td>@m.Item</td>
                <td>@m.Description</td>
                <td>@m.Itemizations</td>
                <td>@m.Currency</td>
                <td>
                    <input class="Select" id="ButtonSelect" type="button" value="选择" />
                </td>
            </tr>
        }
    </table>
Source Code

相关文章: