前端生成txt文件,存储表单里需要提交的数据
为了方便自己用,也为同学们学习做个参考,用先分享出来哈
直接调用下面封装好的的方法就可以实现
var blob = null;
if(blob == null){
blob = new Blob([JSON.stringify(this.file)], {type: "text/plain;charset=utf-8"});
}
saveAs(blob, "pe.txt"...
原创
2019-12-02 14:48:58 ·
806 阅读 ·
0 评论