开发者

Javascript to hit a url and cause a open/save file dialog to appear (without a new window entirely)

开发者 https://www.devze.com 2023-01-04 08:36 出处:网络
What javascript could I use to open a url without leaving the current page and get an open/save file dialo开发者_JAVA技巧g to appear?I dont think i get your question completely but if you are asking o

What javascript could I use to open a url without leaving the current page and get an open/save file dialo开发者_JAVA技巧g to appear?


I dont think i get your question completely but if you are asking on how to use JS to invoke a open/save dialog for a file:

window.location = 'paste your url here';

The url should point to a resouce for which the browser is configured to show the open/save dialog.


I ended up using...

Window.open("mylocation", "Download", "width=400,height=150")
0

精彩评论

暂无评论...
验证码 换一张
取 消