Is it possible to replace a table cell without deleting it with javascript or jQuery?
<p>Is it possible to replace a table cell without deleting it with javascript or jQuery?  For example, if I have a table with several rows, each row having 5 cells, could I change the first cell of the first row through assignment instead of removing the cell and then inserting a new one?</p>

<p>EDIT (simplified):</p>

<pre><code>&lt;table&gt;
    &lt;tr id="currentRowId1" name="currentRowId1"&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
            &lt;input type="submit" onclick="changeOrder()" /&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr id="currentRowId2" name="currentRowId2"&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
            &lt;input type="submit" onclick="changeOrder()" /&gt;
        &lt;/td&gt;
        &lt;td style="text-align:center"&gt;
        &lt;/td&gt;
        &lt;td&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>js</p>

<pre><code>function changeOrder(){
var row = document.getElementById("currentRowId1");
var otherRow = document.getElementById("currentRowId2");
row.cells[0] = otherRow.cells[0];
}
</code></pre>
