📅  最后修改于: 2022-03-11 15:04:01.148000             🧑  作者: Mango
//javascript
function download(text, name, type) {
var a = document.getElementById("a");
var file = new Blob([text], {type: type});
a.href = URL.createObjectURL(file);
a.download = name;
}
//html
click here to download your file