【问题标题】:jQuery - how to find specific cell in a table using selectors?jQuery - 如何使用选择器在表格中查找特定单元格?
【发布时间】:2014-11-14 15:22:48
【问题描述】:

鉴于每个单元格都有 row, col 属性。 我试过类似的东西

$(#mytable tr td row=1 col=1)

但它不起作用

【问题讨论】:

  • 你的意思是$(#mytable tr:eq(0) td:eq(0)

标签: jquery html-table jquery-selectors row col


【解决方案1】:

您可以使用first-childnth-child。例如:

$("#mytable tr:first-child td:first-child")

$("#mytable tr:nth-child(1) td:nth-child(1)")

【讨论】:

    猜你喜欢
    • 2011-05-04
    • 1970-01-01
    • 2010-12-07
    • 2010-10-20
    • 1970-01-01
    • 2014-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多