如何遍历第三个单元格具有rowspan属性的每一行

Nik*_*l D 1 javascript jquery

for (var i = 0; row = tableAppointment.rows[i]; i++) {
  for (var j = 0; col = row.cells[j]; j++) {
    //iterate through columns
    //columns would be accessed using the "col" variable assigned in the for loop.
  }
}
Run Code Online (Sandbox Code Playgroud)

如何遍历第三个单元格具有rowspan属性的每一行.

Aln*_*tak 8

这将为您提供所有<tr>具有此类元素的内容:

$('td:nth-child(3)[rowspan]').parent()
Run Code Online (Sandbox Code Playgroud)

演示http://jsfiddle.net/52aR2/1/