如何使用c#asp.net或jquery在单击图像按钮中将按钮用于文件或图像上传? [英] How to image button use for file or image upload in click image button, using c# asp.net or jquery?

查看:52
本文介绍了如何使用c#asp.net或jquery在单击图像按钮中将按钮用于文件或图像上传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



如何使用c#asp.net或jquery在单击图像按钮中将按钮用于文件或图像上传?



请帮帮我。



先谢谢。



Ankit Agarwal

网站开发者

Hello,

How to image button use for file or image upload in click image button, using c# asp.net or jquery?

Please help me.

Thanks in Advance.

Ankit Agarwal
Website Developer

推荐答案

<body>
    <label>File</lable>
    <input type="image" src="http://upload.wikimedia.org/wikipedia/commons/c/ca/Button-Lightblue.svg" width="30px"/>
    <input type="file" id="my_file" style="display: none;" />
</body>








input [type ='image'])。click( function (){
("input[type='image']").click(function() {


input [id ='my_file'])。click();
});
("input[id='my_file']").click(); });





小提琴演示 [ ^ ]



希望这可能会有所帮助。



Fiddle Demo[^]

Hope this may help.


这篇关于如何使用c#asp.net或jquery在单击图像按钮中将按钮用于文件或图像上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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