I have a very similar requirement specified here .
(我在这里指定了非常相似的要求。)
I need to have the user's browser start a download manually when $('a#someID').click();
(我需要让用户的浏览器在$('a#someID').click();
时手动开始下载$('a#someID').click();
)
But I cannot use the window.href
method, since it replaces the current page contents with the file you're trying to download.
(但我无法使用window.href
方法,因为它将当前页面内容替换为您尝试下载的文件。)
Instead I want to open the download in new window/tab.
(相反,我想在新窗口/选项卡中打开下载。)
How is this possible?(这怎么可能?)
ask by Mithun Sreedharan translate from so