rowspan found then check first cell have text or not?
<p>I have HTML table. I'm looping through table and iterate over each row whose third cell has a rowspan attribute.
How I check if rowspan is found then check its first cell have text or not. If yes then assign to javascript variable.</p>

<pre><code>for (var i = 0; row = myTable.rows[i]; i++) {
    if( row.cells[2].hasAttribute("rowspan") {

    }
}




 &lt;table id="myTable"&gt;
    &lt;tr&gt;
    &lt;td&gt;cell1&lt;/td&gt;
    &lt;td&gt;cell2&lt;/td&gt;
    &lt;td&gt;cell3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;cell4&lt;/td&gt;
    &lt;td&gt;cell5&lt;/td&gt;
    &lt;td rowspan="2"&gt;cell6&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;cell8&lt;/td&gt;

    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;td&gt;cell9&lt;/td&gt;
    &lt;td&gt;cell10&lt;/td&gt;
    &lt;td&gt;cell11&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
</code></pre>
