Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/468.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 如何通过多次单击添加图标添加图像_Javascript_Jquery_Html - Fatal编程技术网

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

Javascript 如何通过多次单击添加图标添加图像,javascript,jquery,html,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. -->

下面的代码用户可以通过按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>



pot更多的代码..pot更多的代码。。