日期:2014-05-16  浏览次数:20362 次

点击增加按钮,动态添加附件。即新增一行有input type=file,并且给这个input重新命名字
<table width="100%"  bgcolor="#F4F4F4" id="tbl">
<tr valign="middle" id ="dv">
<td width="10%" align="right" nowrap><span
class="green">上传附件:</span></td>
<td width="50%" align="left" id=filespan>
<input type="file" id="uploadBulletionFileName" name="uploadBulletionFileName">
</td>
 <td  width="10%"align="left">
<xart:button value="增加" onclick="insert_row(this.form)" />
</td> 
</tr>
</table>
动态增加行,给行中元素重命名

------解决方案--------------------
var d=document.createElement(tagName);
d.setAttribute("name",name)
试试