mirror of
https://github.com/gotoeasy/glogcenter.git
synced 2025-09-15 12:58:34 +08:00
下载文件名logfile.txt
This commit is contained in:
parent
6e0f883bc4
commit
e0ed8d1d78
@ -300,7 +300,7 @@ function fnDownload() {
|
||||
const blob = new Blob([fileContent], { type: 'text/plain' }); // 创建Blob对象
|
||||
const downloadLink = document.createElement('a');
|
||||
downloadLink.href = URL.createObjectURL(blob);
|
||||
downloadLink.download = 'example.txt'; // 文件名
|
||||
downloadLink.download = 'logfile.txt'; // 文件名
|
||||
downloadLink.click(); // 模拟点击下载链接
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user