Download File Using Javascript/jQuery

前端 未结 28 3721
悲&欢浪女
悲&欢浪女 2020-11-21 05:11

I have a very similar requirement specified here.

I need to have the user\'s browser start a download manually when $(\'a#someID\').click();

But

28条回答
  •  天命终不由人
    2020-11-21 05:44

    The answer submitted by hitesh on Dec 30 '13 does in fact work. It just requires a little adjusting:

    The PHP file can call itself. In other words, just create a file named saveAs.php, and put this code into it...

            Download pdf here
    
        
    

提交回复
热议问题