<html>
<style>
input[type=file] {
display:block;
height:0;
width:0;
}
</style>
<input type="button" value="choose file"/>
<input type="file" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('input[type=button]').click(function() {
$('input[type=file]').trigger('click');
});
</script>
</html>
<style>
input[type=file] {
display:block;
height:0;
width:0;
}
</style>
<input type="button" value="choose file"/>
<input type="file" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('input[type=button]').click(function() {
$('input[type=file]').trigger('click');
});
</script>
</html>
0 Comments
if you have any doubts , please let me know