如何在不点击上传按钮的情况下浏览图像后显示图像 [英] How do I dispaly image after browsing it without click on upload button

查看:68
本文介绍了如何在不点击上传按钮的情况下浏览图像后显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,

我使用文件上传的一个浏览按钮。要删除的链接按钮。一个用于显示图像的图像控件。

使用文件上传浏览图像或文件后我想立即在图像控件中显示该图像(即显示在同一页面上)。
点击后
在删除浏览后应该删除和图像也应该删除。

浏览图片后它应该只显示图像名称而不是整个路径。

最后点击提交按钮它保存在数据库中。

Hii,
I take one browse button using file upload. A link button to remove. one image control for displaying the image.
After browsing image or file using file upload I want that image immediately in image control(i.e. display on same page).
after clicking on remove the browsed should remove and image should also get remove.
after browsing image it should show only the image name not whole path.
At the end on click on submit button it save in database.

推荐答案

我为你的问题创建了一个小提琴,这可能会对你有帮助......



http://jsfiddle.net/Amit_Jadli/uk3vL6f1/ [ ^ ]
I have created one fiddle for your question may be this will help you...

http://jsfiddle.net/Amit_Jadli/uk3vL6f1/[^]


查看阅读文件演示


http://www.html5rocks.com/en/ tutorials / file / dndfiles / [ ^ ]



注意这是唯一可能的如果浏览器支持html5,对于非html5浏览器,你需要一个像flash或java这样的客户端插件来执行此操作。
Look at the "Reading files" demo

http://www.html5rocks.com/en/tutorials/file/dndfiles/[^]

Note this is only possible if the browser supports html5, for non-html5 browsers you'll need a client plug-in like flash or java to do this.


这篇关于如何在不点击上传按钮的情况下浏览图像后显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆