If I have the following variables:
var ordercode, ordername, order1price, orderfree;
How can I add the values of these variables to attr[value] using 'each'?
<form>
<input type="hidden" name="ordercode" value="">
<input type="hidden" name="ordername" value="">
<input type="hidden" name="order1price" value="">
<input type="hidden" name="orderfree" value="">
</form>
Like:
$('form input').each(function {
value = ordercode where name = ordercode
})
Thanks!