Download File Using Javascript/jQuery

前端 未结 28 2880
悲&欢浪女
悲&欢浪女 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:38

    This could be helpful if you are not require to navigate another page. This is base javascript function, so can be used in any platform where backend is in Javascript

    window.location.assign('any url or file path')
    

提交回复
热议问题