Answers for "html button click to upload"

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
1

upload button in html

<form action="/action_page.php">
  <input type="file" id="myFile" 
  name="filename">
  <input type="submit">
</form>
Posted by: Guest on September-28-2020

Browse Popular Code Answers by Language