How can I get the value that a user has entered into an input field using jQuery
<p>I am using the following function:</p>

<pre><code>$.each($('.update-grid'), function (i, e) {
var ID = e.id.replace('modal', 'input');
$("#" + ID).val(e.value);
}); 
</code></pre>

<p>to get a value that's just been entered into an input field such as this after form submission. The requirement is to take this user enterered value and put it in another field. For example transfer the value entered into #modal-title into the field #input-title.</p>

<pre><code>&lt;input id="modal_Order_1" class="update-grid full-width" type="text" 
value="337" name="Content.Order" &gt;
</code></pre>

<p>However the "e.value" gives me the value 337 and not the value that the user entered just before the form was submitted. </p>

<p>Is there a way I can get the NEW value entered?</p>

<p><strong>Update:</strong></p>

<p>This seems to work:</p>

<pre><code>        $('.update-grid')
            .each(function () {
                var id = this.id.replace('modal', '');
                $('#input' + id).val(this.value)
            })
</code></pre>
