如何使用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.