Skip to content Skip to sidebar Skip to footer

Upload File With One Button

How can I make a button in the html you need to send files that allow you to select the file and then sending it on the page that I want without using a button to select the file a

Solution 1:

<form><inputtype="file"onchange="this.form.submit()" /></form>

Solution 2:

You should use

HTML

<formid="form"><inputtype="file"id=file"/></form>

more info: http://www.w3.org/wiki/HTML/Elements/input/file

Jquery

$("#file").onchange(function () {
 $("#form").submit();
});

Post a Comment for "Upload File With One Button"