前端下载csv文件,代码如下:function downloadCsv() { var csv = `"Name","Number"\n"Steampod 2.0 + Sérum + Creme de lissage cheveux epais + trousse glossy","15"`; var csvFile; var downloadLink; csvFile = new Blob([csv], { type: "text/csv" }); downloadLink = document.createElement("a"); downloadLink.download = 'test.csv'; downloadLink.href = window.URL.createObjectURL(csvFile); downloadLink.style.display = "none"; document.body.appendChild(downloadLink); downloadLink.click(); }下载得到的文件打开如下,特殊字符这个要怎么处理?
添加回答
举报
0/150
提交
取消