button onclick upload code example
Example: button onclick upload
<input type="file" id="file" style="display:none;" />
<button id="button" name="button" value="Upload" onclick="thisFileUpload();">Upload</button>
<script>
function thisFileUpload() {
document.getElementById("file").click();
};
</script>