另一个选项更直接地从td中的输入获取title属性
Alternative option more direct to get the title atribute from an input in td?
我有表(也是http://jsfiddle.net/tW6qa/)
<table id="tabla_descuentos" class="tablesorter dataTable" cellspacing="0">
<thead>
<tr role="row">
<th>ID</th>
<th>Activo</th>
<th>Tipo</th>
<th>Monto</th>
<th>Inicio</th>
<th>Termino</th>
</tr>
</thead>
<tbody>
<tr id="tienda_20" class="odd">
<th class="">20</td>
<th class=" sorting_1"><input type="image" title="Activo" src="images/icn_alert_success.png"></td>
<th class="">General</td>
<th class="">- $ 2</td>
<th class="">2014-05-28</td>
<th class="">0000-00-00</td>
</tr>
<tr id="tienda_34" class="even row_selected">
<th class="">34</td>
<th class=" sorting_1"><input type="image" title="No activo" src="images/icn_logout.png"></td>
<th class="">General</td>
<th class="">-100 %</td>
<th class="">0000-00-00</td>
<th class="">0000-00-00</td>
</tr>
<tr id="tienda_38" class="odd">
<th class="">38</td>
<th class=" sorting_1"><input type="image" title="No activo" src="images/icn_logout.png"></td>
<th class="">General</td>
<th class="">-99 %</td>
<th class="">0000-00-00</td>
<th class="">0000-00-00</td>
</tr>
<tr id="tienda_13" class="even">
<th class="">13</td>
<th class=" sorting_1"><input type="image" title="No activo" src="images/icn_logout.png"></td>
<th class="">General</td>
<th class="">- $ 1.000</td>
<th class="">0000-00-00</td>
<th class="">0000-00-00</td>
</tr>
<tr id="tienda_17" class="odd">
<th class="">17</td>
<th class=" sorting_1"><input type="image" title="No activo" src="images/icn_logout.png"></td>
<th class="">Zapato</td>
<th class="">- $ 123</td>
<th class="">0000-00-00</td>
<th class="">0000-00-00</td>
</tr>
</tbody>
</table>
和我需要输入的标题属性的第2 tr与类"row_selected"
我有这个方法,但我认为不是最直接的方法。
$($($('.row_selected')[0].children[1].firstChild))[0].title
var title = $('tr.row_selected th:eq(1) input').prop('title');
相关文章:
- 从MySQL数据库中获取输入数据需要两次页面刷新
- 输入字段将't获取更新的值
- 如何从客户端的数组中获取用户输入和返回值
- 在数据库中循环值时,为输入框获取唯一值
- Javascript获取具有不同id的文件数's来自没有多个属性的文件输入元素
- 如何使用html/html5中的用户输入获取完整的地理位置详细信息
- 使用 D3 中用户的输入获取值
- 我如何使用javascript并根据提供的输入获取JSON数据
- 提前输入获取远程数据问题
- 根据递归ul中的输入获取一个表单的序列化数组
- 正在尝试根据用户输入获取总额
- Emberjs:从输入获取数据
- 从任意数量的输入获取JavaScript对象
- 在鼠标输入获取下拉元素的焦点
- 如何使用javascript或jquery为新表单输入获取更新的json文件
- 通过用户输入获取变量
- 我如何从html输入获取属性值
- 另一个选项更直接地从td中的输入获取title属性
- 从命令行输入获取完整的iframe url,并从python变量解析为HTML
- AngularJS FORMs:根据前面的输入获取第二个SELECT BOX的Items