Download File jQuery

Asked

Viewed 308 times

0

I have a function click on jQuery and wanted me to click on the button it download a PDF file, as I do this function?

  $('#download').click(function() {
  
  //seria aqui a função
  
  }
<button type="button" id="download"> Download PDF </button>

  • https://stackoverflow.com/questions/34586671/download-pdf-file-using-jquery-ajax

  • 1
  • It is worth noting that for logical and even security issues, who decides the download is the developer of the site. You can provide download qualquer arquivo provided that it is published in your domain. If <a href='meu-arquivo.PHP' download>Download</a> will make available to download.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.