javascript - Select second to last element -
i need select value of second last input selectable element:
<tr><td><select class="x">...</select></td></tr> <tr><td><select class="x">...</select></td></tr> <tr><td><select class="x">...</select></td></tr>
the select input tag inside tr tags.
if use $("select.x").last()
, jquery select last element. need select second last.
you can use .prev()
$("select.x").last().prev();
Comments
Post a Comment