Javascript Can';t显示已上载的文件

Javascript Can';t显示已上载的文件,javascript,html,ajax,Javascript,Html,Ajax,我在浏览器中显示上载的文件时遇到问题 在上面的图片中,我设法上传并查看了文档表中的文件,但我似乎无法对照片部分(文档下面的部分)执行相同的操作。这是我的代码。有人能帮我吗?提前谢谢 文档: 文件名 地位 文件大小 行动 照片: 照片名称 地位 文件大小 行动 第一个输入工作正常,但对于第二个输入,上载工作正常,但无法显示已上载到表中的文件。输入的名称和ID相同。不确定,但可能表格不能处理这个问题。ID至少应该是唯一的。我认为表单数据存储在名称属性下,因此其中两个可能不起作用。我尝

我在浏览器中显示上载的文件时遇到问题

在上面的图片中,我设法上传并查看了文档表中的文件,但我似乎无法对照片部分(文档下面的部分)执行相同的操作。这是我的代码。有人能帮我吗?提前谢谢


文档:


文件名 地位 文件大小 行动 照片:


照片名称 地位 文件大小 行动

第一个输入工作正常,但对于第二个输入,上载工作正常,但无法显示已上载到表中的文件。

输入的名称和ID相同。不确定,但可能表格不能处理这个问题。ID至少应该是唯一的。我认为表单数据存储在名称属性下,因此其中两个可能不起作用。我尝试使用不同的名称和ID,但仍然不能。@wazz您能给出一个示例来解决这个问题吗?
<form name="form_id" id="form_id" action="javascript:void(0);" enctype="multipart/form-data" style="width:800px; margin-top:20px;">  

                            <div class="row">
                                <div class="col-lg-12">
                                    <label class="fieldlabels">Documentation:</label> <br>
                                    <input type="file" name="vasplus_multiple_files" id="vasplus_multiple_files"  accept="application/pdf" multiple="multiple"/><br>  
    <!--input type="submit" value="Upload" /--><br>
                                    <table class="table table-striped table-bordered" style="width:60%;" id="add_files">
                                    <thead>
                                    <tr>
                                    <th style="color:blue; text-align:center;">File Name</th>
                                    <th style="color:blue; text-align:center;">Status</th>
                                    <th style="color:blue; text-align:center;">File Size</th>
                                    <th style="color:blue; text-align:center;">Action</th>
                                    <tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                    </table>
                                </div>


                            </div> 
                            
                              <div class="row">
                                <div class="col-lg-12">
                                    <label class="fieldlabels">Photo:</label> <br>
                                    <input type="file" name="vasplus_multiple_files" id="vasplus_multiple_files" multiple="multiple" accept="image/*"/><br><br>        

                                    <table class="table table-striped table-bordered" style="width:60%;" id="add_files">
                                    <thead>
                                    <tr>
                                    <th style="color:blue; text-align:center;">Photo Name</th>
                                    <th style="color:blue; text-align:center;">Status</th>
                                    <th style="color:blue; text-align:center;">File Size</th>
                                    <th style="color:blue; text-align:center;">Action</th>
                                    <tr>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                    </table>
                                </div>


                            </div> 
                                <input type="submit" value="Upload" /><br>
</form>