我有以下的html代码,以便将最多3个文件上传到我的数据库。只有第一个按钮打开对话框并获取filename3输入文本的路径字符串。如何修复所有3个上传文本输入?
<div>
<input type="button" value="upload.." name="btn1 " id="btn1" class="file_input_button" style="width: 20%; height: 16%; position: absolute; top: 25%; right: 10%;" />
<input type="file" name="file1" id="file1" class="file_input_hidden" onchange="javascript: document.getElementById('fileName1').value = this.value" />
<input type="text" name="fileName1" id="fileName1" class="file_input_textbox" readonly="readonly" style="width: 55%; height: 10%; position: absolute; top: 25%; right: 32%;" />
</div>
<div>
<input type="button" value="upload.." name="btn2 " id="btn2" class="file_input_button" style="width: 20%; height: 16%; position: absolute; top: 50%; right: 10%;" />
<input type="file" name="file2" id="file2" class="file_input_hidden" onchange="javascript: document.getElementById('fileName2').value = this.value" />
<input type="text" name="fileName2" id="fileName2" class="file_input_textbox" readonly="readonly" style="width: 55%; height: 10%; position: absolute; top: 50%; right: 32%;" />
</div>
<div>
<input type="button" value="upload.." name="btn3 " id="btn3" class="file_input_button" style="width: 20%; height: 16%; position: absolute; top: 75%; right: 10%;" />
<input type="file" name="file3" id="file3" class="file_input_hidden" onchange="javascript: document.getElementById('fileName3').value = this.value" />
<input type="text" name="fileName3" id="fileName3" class="file_input_textbox" readonly="readonly" style="width: 55%; height: 10%; position: absolute; top: 75%; right: 32%;" />
</div>