Include the input element type="file" on your HTML page and in the click event of your button, display the click event of the input type element using the jQuery trigger function
The code will look like this:
<input type="file" id="imgupload" style="display:none"/> <button id="OpenImgUpload">Image Upload</button>
And in a button click event write jQuery code, for example:
$('#OpenImgUpload').click(function(){ $('#imgupload').trigger('click'); });
The File Download dialog box appears at the click event.
Abhay prince
source share