如何在html中创建保存文件对话框 [英] how to create a save file dialog in html

查看:574
本文介绍了如何在html中创建保存文件对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好新来html,我想知道如何创建一个文件保存对话框。它不应该是一个文件打开对话框。有可能在HTML中做?我发现这两个组件

Hi um new to html and I want to know the way to create a file save dialog box. It should not be a file open dialog box. is it possible to do in html ? I found these two components

 <input type="file" dialogtype="save" />

这会创建一个文件上传对话框,虽然它提到dialogtype为save

This creates a file upload dialog box though it mentioned the dialogtype as save

推荐答案

如果要制作下载链接(允许用户下载文件服务器)。您可以< a> 标记给予服务器路径。所以当用户点击链接浏览器时会要求用户保存文件。

If you want to make download link ( Allowing user to download file server ). You can <a> tag to give server path. So when user click on the link browser will ask user to save the file.

例如:

Ex:

<a href="link/to/file.zip">Download</a>

这篇关于如何在html中创建保存文件对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆