![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
杂类
wwww....
啾~每天都在路上
展开
-
去掉html标签外的空字符串
【代码】去掉html标签外的空字符串。原创 2022-10-31 17:09:59 · 122 阅读 · 1 评论 -
根据视频链接并下载视频(mp4格式)
直接上代码export function download(url, filename) { getBlob(url, (blob) => { saveAs(blob, filename); })}const getBlob = (url, cb) => { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'blob'; xhr.onload =原创 2020-12-08 18:19:33 · 6778 阅读 · 1 评论 -
下载excel
后端返回的是流数据,前端接收并下载文件//response为返回的流数据,如果是fetch的话记得response.blob()转换格式,//即response.blob().then(blob=>{动态创建元素})var blob = new Blob([response], { //下载的excel类型为xls的type:"application/vnd.mx-excel;ch...原创 2020-04-15 15:46:42 · 1213 阅读 · 0 评论