如题,在Web中想实现将文件保存到本地中,便于后续配置
以下代码仅支持web环境:
function download(filename, content){
var temp = document.createElement("a");
temp.download = filename;
temp.href = URL.createObjectURL(new Blob([content]));
temp.click();
document.removeChild(temp)
}
感谢!!!