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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -