Answers for "js onclick upload file"

2

open the file upload dialogue box onclick the image

<input type="file" id="imgupload" style="display:none"/> 
<button id="OpenImgUpload">Image Upload</button>

$('#OpenImgUpload').click(function(){ $('#imgupload').trigger('click'); });
Posted by: Guest on August-08-2020
1

javascript upload file button

<input id='fileid' type='file' hidden/>
<input id='buttonid' type='button' value='Upload MB' />
Posted by: Guest on December-29-2020
0

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