使用jquery查找最后一行输入值类型 [英] Finding last row input value type using jquery

查看:60
本文介绍了使用jquery查找最后一行输入值类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我使用的代码:



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





来识别最后一行的值。但是当我循环迭代时,它可能是输入类型或文本区域或选择选项。



如何修改以查找值而不管其是什么控件类型?

解决方案

this )。find( ' td:last')。find(' 输入)VAL())。





来识别最后一行的值。但是当我循环迭代时,它可能是输入类型或文本区域或选择选项。



如何修改以查找值而不管其是什么控制类型?





如果你想要最后一行那么

 

(this).find('tr:last')。child()。first()。val();



if b想要最后一个单元格然后

 


Hi
I am using the code:

$(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?

解决方案

(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?


Hi
If you wants last row then


(this).find('tr:last').child().first().val();


if you wants last cell then


这篇关于使用jquery查找最后一行输入值类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆