Answers for "upload button click js"

0

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>
Posted by: Guest on March-11-2021
3

javascript upload file button

document.getElementById('buttonid').addEventListener('click', openDialog);

function openDialog() {
  document.getElementById('fileid').click();
}
Posted by: Guest on December-29-2020

Browse Popular Code Answers by Language