Answers for "how to upload and download file in javascript"

-1

download file javascript

function download(link) {
  var element = document.createElement('a');
  element.setAttribute('href', link);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);
}
Posted by: Guest on January-28-2021
0

javascript upload file button

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

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

Code answers related to "how to upload and download file in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language