Reylin Mathew

Reylin Mathew

  • NA
  • 347
  • 70.8k

download a text file

May 26 2020 9:31 AM
var link=document.createElement('a');
link.href = filePath;
link.download = filePath.substr(filePath.lastIndexOf('/') + 1);
link.click();
 
this is not working for chrome. in text file in view on same browser,.
 
i want automatically download in text file on download button..
 
plz help me..
thanks in advance..

Answers (2)