הסתדרתי
קוד:
<script language="javascript">
(function() {
var i = 0;
window.addfile = function() {
var input = document.createElement('input');
input.type = 'file';
input.name = 'file' + i++;
document.getElementById('form_name').appendChild(input);
}
})();
</script>
<form id="form_name">
<input type="button" onclick="addfile();" value="add file input" />
</form>