<form name="filesform" action="files.php" method="post" enctype="multipart/form-data"> <table style="margin:1em 0 1em 0"> <tr valign="top" id="fileInput0" > <td><b>File 1:</b></td> <td><input type="file" name="userFile[]" size="20" onkeypress="KeyPress()" ></td> </tr> <tr valign="top" id="fileInput1" > <td><b>File 2:</b></td> <td><input type=file name=userFile[] size=20 onkeypress="KeyPress()" ></td> </tr> <tr valign="top" id="fileInput2" > <td><b>File 3:</b></td> <td><input type=file name=userFile2 size=20 onkeypress="KeyPress()" ></td> </tr> </table>
document.write(document.filesform.getElementsByTagName('input').value);