【发布时间】:2019-05-20 04:22:12
【问题描述】:
我想上传单独的文件,然后在不上传服务器的情况下查看和打印这些文件。如果用户单击发送按钮,将这些文件发送到服务器。
经验:
<p>
<input type="file" id="file1">
<img src="">Show thumbnail here
<button class="print">Print</button>
</p>
<p>
<input type="file" id="file2">
<img src="">Show thumbnail here
<button class="print">Print</button>
</p>
<p>
<input type="file" id="file3">
<img src="">Show thumbnail here
<button class="print">Print</button>
</p>
<p>
<input type="file" id="file4">
<img src="">Show thumbnail here
<button class="print">Print</button>
</p>
<button>Send All Files to Server</button>
我可以只使用 vanilla JS 而不使用第三方应用程序吗?
【问题讨论】:
标签: javascript html ajax file-upload printing