javascript - data:application/vnd.ms-excel设置excel名称
ringa_lee
ringa_lee 2017-04-11 12:53:22
0
1
1510

window.open('data:application/vnd.ms--excel;base,' + base64data);怎么设置excel表格名称

ringa_lee
ringa_lee

ringa_lee

répondre à tous(1)
刘奇

不使用window.open()方式下载excel。
更改为:
document.getElementById(a标签id).href ='data:application/vnd.ms-excel;base,' + base64data;//必须是a标签,否则无法下载改名
document.getElementById(a标签id).download = fileName;

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!