put value of hidden input into variable using jquery
<p>I have the following markup that I need to put the value of the input named "ProductCode" to a variable named lets say product_id using jquery</p>

<p>It's probably easy but for some reason I simply can't figure it out.</p>

<pre><code>&lt;input type="image" src="/v/vspfiles/templates/100/images/buttons/btn_addtocart.gif" id="btnaddtocart" name="btnaddtocart" alt="Add to cart" border="0" onclick="return addToCart2(this.form, this);" /&gt;

                          &lt;input type="hidden" name="ReplaceCartID" value="" /&gt;
                          &lt;input type="hidden" name="ProductCode" value="M406789" /&gt;
                          &lt;input type="hidden" name="e" value="" /&gt;

                              &lt;input type="hidden" name="ReturnTo" value="ShoppingCart.asp" /&gt;
</code></pre>
