getting file from file upload js code example
Example 1: javascript upload file button
<input id='fileid' type='file' hidden/>
<input id='buttonid' type='button' value='Upload MB' />
Example 2: javascript upload file without input
<style>
input {
display: block;
visibility: hidden;
width: 0;
height: 0;
}
</style>
<input type="file" name="somename" size="chars">
<button>Choose File</button>
<script>
$('button').click(function(){
$('input').click();
});
</script>