如何把这几个name="proc"的文本框中的内容合并到一个input。求js代码!
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input id="peocessdescription" type="text" name="decription"/>
如何把这几个name="proc"的文本框中的内容合并到一个input。求js代码!
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input type="text" name="proc"/>
<input id="peocessdescription" type="text" name="decription"/>
var value;
$("input[name='proc']").each(function(){
value += $(this).val();
});
$('#peocessdescription').val(value);