html5图片上传
我正在尝试用 html5 制作一个非常简单的图像上传器。
<input type="file" multiple=""/>
我想做的就是显示上传的内容,而不使用 PhP 或任何东西。我可以使用与此类似的代码吗?
<img src="WHATEVER WAS UPLOADED"/>
谢谢!
I'm trying to make a VERY simple image uploader in html5.
<input type="file" multiple=""/>
All I would like to do is display what is uploaded without using PhP or anything. Could I use code similar to this?
<img src="WHATEVER WAS UPLOADED"/>
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现
很有帮助。
如果您不想将图像推送到某个服务器(我从您的问题中假设这一点),您可以在本地更新图像:
或类似的东西。
i found
rather helpful.
if you dont want to push the image to some server ( i assume this from your question ), you can just update the image locally :
or somesuch.
您可以使用 HTML5 File Api 对此进行存档。
以下教程应该可以帮助您入门:在 JavaScript 中读取本地文件
You could archive this with HTML5 File Api.
Following tutorial should get you started: Reading local files in JavaScript