Display time with jquery
<p>Consider these two table:</p>

<pre><code>&lt;table id="prototype" style="display:none;"&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="text" &gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo date("h:i:s");?&gt;&lt;/td&gt;
&lt;td&gt;&lt;?php echo date("d-m-Y");?&gt;&lt;/td&gt;
&lt;td&gt;
    &lt;a href="#" class="removeRow"&gt;&lt;img width="20px" height="20px" src="images/Remove32.PNG" title="remove" /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
  &lt;table id="tblGrid" cellspacing="0"&gt;
    &lt;tr&gt;
      &lt;th&gt;Instraction&lt;/th&gt;
      &lt;th&gt;Result&lt;/th&gt;
      &lt;th&gt;Time&lt;/th&gt;
      &lt;th&gt;Date&lt;/th&gt;
      &lt;th&gt;Add&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php do { ?&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;?php echo $row_instRecordset['instName']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_instRecordset['instValue']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_instRecordset['instTime']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_instRecordset['instDate']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;a class="addRow"&gt;&lt;img width="20px" height="20px" src="images/add_32.png"/&gt;&lt;/a&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php } while ($row_instRecordset = mysql_fetch_assoc($instRecordset)); ?&gt;
  &lt;/table&gt;
  &lt;a class="newOrder"&gt;Save&lt;/a&gt;
</code></pre>

<p>I used this jQuery function to insert new row exactly after clicked row</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
        var $prototypeRow = $("#prototype").find("tr").eq(0);
    $(".addRow").click(function(){
        $prototypeRow.clone(true).insertAfter($(this).closest("tr"));
        return false;
    });
    $(".removeRow").click(function(){
        if( confirm('Remove row?') ){
            $(this).closest("tr").remove();
        }
        return false;
    });
});
&lt;/script&gt;
</code></pre>

<p>This is working fine for insertion, but I encounter a problem in displaying the current time.</p>

<p>It displays the wrong time, and it doesn't change when I click the insertion button. It repeats the same time and doesn't "take new read".</p>

<p>This on third <code>&lt;td&gt;</code> the second <code>&lt;td&gt;</code> contain text input and I want to ask how can I (using jQuery) replacing this text input field with its value after clicking in save button?</p>
