<input type="button" value="继续添加" onclick="append();"/ >
<div id="div1" >
<input type="file" name="file1" >
<div >
<script language="javascript" >
var index=1;
function append()
{
var div =document.getElementById("div1");
var file=document.createElement("input");
file.setAttribute("type","file");
index++;
var name=file+index;
file.setAttribute("name",name);
div.appendChild(file);
var br=document.createElement("br");//换行
div.appendChild(br);
}
</script >