Download!. I hade a case where my Javascript generated a CSV file." name="description" />

Js onclick download file

you can try like below. Hide Copy Code.
  • 20 Mar 2014 A discussion of 3 new HTML5 attributes for hyperlinks: download, media, and ping. The value of the download attribute is used for the name of the file And here's a live demo: JS Bin. Note that in a real-world application, 
  • 4 Comments
  • Chrome now supports the HTML spec's new download attribute to a elements. the filename that user agents are to use when storing the resource in a file 

    The clickHandler definition needs to move into an external JavaScript file ( popup.js would be a good Download the file, include it in your package, and write:.

    Print.js was primarily written to help us print PDF files directly within our apps, without to open or download the PDF files, and instead, they just need to print them.