jQuery:如何仅根据表头从表的列中选择值 [英] jQuery: How to select the values from the table's column based on tables header only

查看:89
本文介绍了jQuery:如何仅根据表头从表的列中选择值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带标题ID的表。我需要选择此标题下的所有字段。
我无权访问源代码,此表中没有使用任何类。
关于如何完成任务的任何想法?

I have a table with header ID. I need to select all the fields under this header. I don't have access to the source code and no classes are used in this table. Any idea on how to get this done?

推荐答案

获取第一列:

$(function() {
   var col = $("td:nth-child(1)");
});

这篇关于jQuery:如何仅根据表头从表的列中选择值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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