我有一张5 x 5的表格。每个单元格都是一个asp.net文本框。 我想用非空文本框获取最后一行的5个文本框值。 例如:无法通过jQuery获取html表格中的兄弟值
这应该让地狱啊,我FRIE ND
但我得到的所有值,但最后一个(ND)。我不知道为什么。这里是我的代码:
// RIGHT HERE, $(this) referes to the whole table
$(this).find('input[value!=""]')
// I get the last edited textbox
.last()
// Go up to the parent <td>
.parent('td')
.siblings('td')
// I get all my brothers of type input
.children(':input')
.each(function() {
alert($(this).val());
});
我做错了什么,但什么? 谢谢。
这个工程。谢谢 !! – anmarti