change content of a cell in table usnig javascript
<pre><code>&lt;html&gt;&lt;head&gt;
&lt;script type="text/javascript"&gt;
function addFunction(id)
{
  cnt=parseInt(id.substr(7));
  var row=document.getElementById('driverDetails').insertRow(cnt+1);
  var c1=row.insertCell(-1);
  var c2=row.insertCell(-1);
  var c3=row.insertCell(-1);
  c1.innerHTML="row"+(cnt+1)+"colum1";
  c2.innerHTML="row"+(cnt+1)+"colum2";
  c3.innerHTML='&lt;input type="button" id="addNew_'+(cnt+1)+'" name="addNew_'+(cnt+1)+'" value="Add New"  onclick="addFunction(this.id)"/&gt;';
} 
&lt;/script&gt;
&lt;/head&gt;&lt;body&gt;
  &lt;table&gt; 
     &lt;tr&gt;
         &lt;td&gt;row1 colum1&lt;/td&gt;
         &lt;td&gt;row1 colum2&lt;/td&gt;
         &lt;td&gt;&lt;input type="button" id="addNew_1" name="addNew_1" value="Add New"  onclick="addFunction(this.id)"/&gt;&lt;/td&gt;
     &lt;/tr&gt;        
   &lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>when i click <strong>Add New</strong> button 
<strong>can we change the content of 3rd cell of previous row</strong></p>
