Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/406.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jqueryajax多个上传标签_Javascript_Jquery_Ajax_File Upload - Fatal编程技术网

Javascript jqueryajax多个上传标签

Javascript jqueryajax多个上传标签,javascript,jquery,ajax,file-upload,Javascript,Jquery,Ajax,File Upload,我可以找到很多插件,它们允许我使用一个html输入标记上载多个文件,但我希望这些文件有多个html输入标记,但只有一个ajax调用 我可以只调用一个ajax来上传文件吗 以下是我的html示例: <fieldset> <legend>test Files</legend> <label for="testFile">Test File <span class="small">Change the test

我可以找到很多插件,它们允许我使用一个html输入标记上载多个文件,但我希望这些文件有多个html输入标记,但只有一个ajax调用

我可以只调用一个ajax来上传文件吗

以下是我的html示例:

<fieldset>
    <legend>test Files</legend>
    <label for="testFile">Test File
        <span class="small">Change the test file.</span></label>
    <input name="testFile" type="file"/>
    <label for="iconFile">Test Icon File
        <span class="small">Change the test icon.</span></label>
    <input name="iconFile" type="file"/>
    <label for="featuredFile">Test Featured File
        <span class="small">Change the test featured.</span></label>
    <input name="featuredFile" type="file"/>
</fieldset>

测试文件
测试文件
更改测试文件。
测试图标文件
更改测试图标。
测试特征文件
更改测试功能。

我使用的是允许选择多个文件并通过ajax上传它们的函数。

它们都可以调用相同的函数,然后上传文件