JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

本地下载 web file操作

发布时间 2023-06-15 15:52:27作者: hjswlqd
function download(){
    const link = document.createElement('a')
    link.href = window.location.origin  + `/static/doc/${this.type}.docx` + '?auth=' + getToken()

    const fileName = '20230615.docx'
    link.download = fileName

    document.body.appendChild(link)
    link.click()
    document.body.removeChild(link)

}

 

 

 

    本栏目推荐文章
  • IDEA项目名称后面出现中括号,模块Modules的名子和文件夹名称不同,可以右键修改名称也可以在File->Project Structure 修改Modules的Name(快捷键ctrl+Shift+Alt+s)
  • 函数计算域名调试web应用
  • Pycharm读excel文件报错xlrd.biffh.XLRDError: Excel xlsx file not supported
  • web目录探测:Dirsearch
  • fish和pacman:“error: Unable to read input file: 是一个目录”报错的处理
  • web项目启动时dubbo报错: No provider available for the service com.davidhu.shopguide.api.service.UserEventService from the url zookeeper ://localhost:2181/org.apache.du
  • 如何基于 Gin 封装出属于自己 Web 框架?
  • "nginx.conf" E514 : write error (file system full?)
  • redis报错MISCONF Errors writing to the AOF file: No space left on device,磁盘满无法写入数据报错
  • [极客大挑战 2019]Secret File 1
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们