开发者

chaining and getting the value of an input

开发者 https://www.devze.com 2022-12-28 01:33 出处:网络
This code gets the text that\'s in a cert开发者_运维知识库ain column of a table row: var keyA = $(a).children(\'td\').eq(column).text().toUpperCase();

This code gets the text that's in a cert开发者_运维知识库ain column of a table row:

var keyA = $(a).children('td').eq(column).text().toUpperCase();

Q: How do I rewrite this to get the value of an input tag that's in the table cell?

var keyA = $(a).children('td').eq(column).('input').val().toUpperCase();


Try this:

var keyA = $(a).children('td').eq(column).find('input').val().toUpperCase();


Oh! It's:

children('input')
0

精彩评论

暂无评论...
验证码 换一张
取 消