How do I iterate through table rows and cells in javascript?
<p>If I have an HTML table...say</p>

<pre><code>&lt;div id="myTabDiv"&gt;
&lt;table name="mytab" id="mytab1"&gt;
  &lt;tr&gt; 
    &lt;td&gt;col1 Val1&lt;/td&gt;
    &lt;td&gt;col2 Val2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;col1 Val3&lt;/td&gt;
    &lt;td&gt;col2 Val4&lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p>How would I iterate through all table rows (assuming the number of rows could change each time I check) and retrieve values from each cell in each row from within Javascript?</p>
