<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>