How to update a table td value with the input field value?
<p>When I click the update button, the table td values should be updated with the input field values. Here is the <a href="http://fiddle.jshell.net/priyaa2002/PWYhD/7/" rel="nofollow">fiddle</a> </p>

<pre><code>$(function() {
    $('#update').click(function(){
       var txt = $(#name).val();
       $('tname').val(txt);                   
});
</code></pre>


                    
                        name:
                        my name
                    
    

<pre><code>&lt;div class="col2-content" id="info"&gt;
    &lt;div class="para"&gt;
        &lt;ol&gt;
            &lt;li&gt;
                 &lt;label for="name"&gt;name:&lt;/label&gt;
                  &lt;input id="name" name="name" type="text" onclick="return false;"&gt;
             &lt;/li&gt;
         &lt;/ol&gt;
         &lt;div class="update"&gt;
            &lt;button id="update" type="submit"&gt;update&lt;/button&gt;
         &lt;/div&gt;
      &lt;/div&gt;
&lt;/div&gt;
</code></pre>
