如何通过多次单击添加图标来添加图像

时间:2017-06-18 06:49:37

标签: javascript jquery html

以下代码用户可以通过按ctrl单击图标发送多个图像。但这不是我想要的。相反,用户可以多次单击相同的图标,每次添加一个图像。例如,在SO提问页面中,用户可以点击相同的"添加图片"图标多次添加多个图像。如何实现这个?

<!-- This is not what I want. Each time one image will be added by clicking
     the same uploader, rather than by pressing ctrl.
 -->
<form action="storeArticle" method="post" enctype="multipart/form-data">
    <input type="file" name="file" multiple onchange="previewFile()"><br/>
    <input type="submit" name="submit" class="submit" id="submit" value="submit" />
</form>

0 个答案:

没有答案