jquery ajax 多个上传标签

jquery ajax multiple upload tags

本文关键字:标签 ajax jquery      更新时间:2023-09-26

我可以找到很多插件,允许我使用一个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>

我正在使用Valmus ajax upload,它允许选择多个文件并通过ajax上传它们。

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

相关文章: