【发布时间】:2026-01-11 09:45:01
【问题描述】:
鉴于每个单元格都有 row, col 属性。 我试过类似的东西
$(#mytable tr td row=1 col=1)
但它不起作用
【问题讨论】:
-
你的意思是
$(#mytable tr:eq(0) td:eq(0)
标签: jquery html-table jquery-selectors row col
鉴于每个单元格都有 row, col 属性。 我试过类似的东西
$(#mytable tr td row=1 col=1)
但它不起作用
【问题讨论】:
$(#mytable tr:eq(0) td:eq(0)
标签: jquery html-table jquery-selectors row col
您可以使用first-child 或nth-child。例如:
$("#mytable tr:first-child td:first-child")
$("#mytable tr:nth-child(1) td:nth-child(1)")
【讨论】: