javascript - 使用 jquery 进行多文件上传,有限制

标签 javascript jquery html file-upload

我正在尝试找到一个具有限制的多个文件上传的解决方案。

我创建了这个 fiddle 来展示我的想法。

http://jsfiddle.net/8MzNs/

在我的表单中使用 HTML

<ul id="file-list">
    <li class="file-box">Image 1</li>
    <li class="file-box">Image 2</li>
    <li class="file-box">Image 3</li>
    <li class="file-box">Image 4</li>
    <li class="file-box">Image 5</li>
</ul>

而不是:

<input type="file" name="file-1" />
<input type="file" name="file-2" />
<input type="file" name="file-3" />
<input type="file" name="file-4" />
<input type="file" name="file-5" />

但是我找不到有这样限制的解决方案。但我可能错过了。

最佳答案

我已经安装了 Uploadify,它运行得很好,然后我将添加一个小脚本(jQuery/PHP),它将在添加图像时显示图像。

关于javascript - 使用 jquery 进行多文件上传,有限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15203557/

相关文章:

javascript - 如何定位 "hidden"iframe? (应用程序: links to starting positions of a "poster image hidden"-embedded Youtube video)

javascript - 用于在 React.js 中检查互联网连接的可重用钩子(Hook)

javascript - 鼠标滚轮事件不会在 Chrome 中触发

javascript - 在 React 中传递变量引用?

jquery - 为什么 jquery ui 自动完成功能放弃对这些功能的支持?

javascript - 如何覆盖我想要隐藏的 div 中 flash 插件的 "always show"属性?

javascript - 为什么表单上的提交按钮不起作用?

javascript - 更有效的监听 jQuery hasClass 方法的方法?

CSS Transform 不会增加父 div 高度

javascript - 使用 jquery 或 javascript 在悬停图像时更改 href 属性