下载文件名logfile.txt

This commit is contained in:
gotoeasy 2023-09-13 22:09:12 +08:00
parent 6e0f883bc4
commit e0ed8d1d78

View File

@ -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>