Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.7k views
in Technique[技术] by (71.8m points)

js如何通过a标签将下载的文件保存到当前js文件的相对路径?

目前有个需求,就是我需要把js数组转换为json,并下载保存在当前js文件的相对路径里

目前我通过下面代码实现了下载功能
image.png

但如何才能选择将下载文件保存在这个js代码文件的相对路径呢?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

??? 下载是下载到客户端吧…… 保存到当前js相对路径是服务器端吧???


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...