Answers for "download file from link 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

how to download file html button

<a href="file.doc">Download!</a>
Posted by: Guest on December-24-2020

Browse Popular Code Answers by Language