当前位置:网站首页>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);
边栏推荐
- Selenium browser (1)
- 叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
- [how to earn a million passive income]
- Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
- jvm-运行时数据区
- C language standard IO function sorting
- RocksDB LRUCache
- 3D视觉——2.人体姿态估计(Pose Estimation)入门——OpenPose含安装、编译、使用(单帧、实时视频)
- Qt学习24 布局管理器(三)
- Dynamic programming 01 knapsack and complete knapsack
猜你喜欢

“又土又穷”的草根高校,凭什么被称为“东北小清华”?
[email protected])|制备路线"/>叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线

【BW16 应用篇】安信可BW16模组与开发板更新固件烧录说明

GoLand 2021.2 configure go (go1.17.6)

The solution of Chinese font garbled code in keil5

金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)

Summary of common error reporting problems and positioning methods of thrift

Logback log sorting

Golang — 命令行工具cobra

MySQL 数据处理值增删改
随机推荐
[acnoi2022] guess numbers
如何使用lxml判断网站公告是否更新
Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
jvm-运行时数据区
Go 1.16.4: purpose of go mod tidy
消息订阅与发布
PHP maze game
Richview trvstyle liststyle list style (bullet number)
Uniapp skills - scrolling components -1
[技术发展-24]:现有物联网通信技术特点
树的深入和广度优先遍历(不考虑二叉树)
RocksDB LRUCache
【556. 下一个更大元素 III】
[556. Next larger element III]
【BW16 应用篇】安信可BW16模组与开发板更新固件烧录说明
Doxorubicin loaded on metal organic framework MIL-88 DOX | folic acid modified uio-66-nh2 doxorubicin loaded [email
Comprehensive case of MySQL data addition, deletion, modification and query
叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
PhpMyAdmin stage file contains analysis traceability
Uniapp skills - dom display and hiding