Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am using the code:

JavaScript
$(this).find('td:last').find('input').val());


to identify the value of last row. but it is possible that it might be input type or text area or select option while i am iterating in loop.

How can I modify to find the value irrespective to its control type?
Posted

1 solution

Hi
If you wants last row then
$(this).find('tr:last').child().first().val();

if you wants last cell then
$(this).find('td:last')..child().first()..val();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900