如何把这几个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);
你样式怎么写的?注意级别和大小写,获取所有input对象组合下value就行了,或者给input name同名,放表单里面直接提交到你的页面去
var obj=document.getElementsByName("proc");
var values="";
for(var i=0;i<obj.length;i++){
values+=obj[i].value();
}
document.getElementById("peocessdescription").value()=values;
看看行不行 没试过