当前位置:网站首页>JS download files through URL links
JS download files through URL links
2022-07-03 13:59:00 【pzy_ six hundred and sixty-six】
Scenario description
ajax After the request , Back end export interface , What is returned is the of the exported file url link
Realization
const elt = document.createElement('a');
elt.setAttribute('href', url);
elt.setAttribute('download', 'file.png');
elt.style.display = 'none';
document.body.appendChild(elt);
elt.click();
document.body.removeChild(elt);
边栏推荐
- How to promote the progress of project collaboration | community essay solicitation
- [acnoi2022] guess numbers
- 可编程逻辑器件软件测试
- Go 1.16.4: manage third-party libraries with Mod
- C language standard IO function sorting
- Selenium browser (1)
- Qt学习17 对话框及其类型
- page owner特性浅析
- Halcon combined with C # to detect surface defects -- Halcon routine autobahn
- 金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子
猜你喜欢

消息订阅与发布

“又土又穷”的草根高校,凭什么被称为“东北小清华”?

Another industry has been broken by Chinese chips. No wonder the leading analog chip companies in the United States have cut prices and sold off

Conversion function and explicit

Go language web development series 26: Gin framework: demonstrates the execution sequence of code when there are multiple middleware

Go language unit test 4: go language uses gomonkey to test functions or methods

使用vscode查看Hex或UTF-8编码

Uniapp tips - scrolling components

FPGA测试方法以Mentor工具为例

Go language web development series 27: Gin framework: using gin swagger to implement interface documents
随机推荐
Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe for the online account manager to open an account
[ACNOI2022]猜数
Record 405 questions about bank callback post request
MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])
【556. 下一个更大元素 III】
Dlopen() implements dynamic loading of third-party libraries
php 迷宫游戏
Common network state detection and analysis tools
Summary of common error reporting problems and positioning methods of thrift
Qt学习25 布局管理器(四)
消息订阅与发布
Dynamic programming 01 knapsack and complete knapsack
Uniapp tips - scrolling components
Rasp implementation of PHP
Flutter dynamic | fair 2.5.0 new version features
全局事件总线
QT learning 17 dialog box and its types