创建上传表单,选择文件夹并获取文件夹中的特定文件

发布于 2024-08-29 00:00:39 字数 221 浏览 0 评论 0原文

要上传单个文件,使用以下 HTML 脚本非常简单: <代码>


在这个问题中,我的任务是选择一个文件夹,然后获取该文件夹内的 input.txt 。服务器将响应input.txt是否可用并将其上传到Web服务器。

有没有办法选择文件夹而不是在输入表单中选择文件。 谢谢。

To upload a single file, it is very simple to use this HTML script:
<p> <input type="file" name="input.txt" />
In this question, my task is to select a folder and then get the input.txt inside that folder. The server will response whether input.txt is available or not and to upload it to web server.

Is there any way to select a folder instead selecting a file in the input form.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2024-09-05 00:00:39

您不能使用 HTML 来选择文件夹。
但是,您可以使用 Java 小程序、Flash 或其他类似技术来在页面中显示文件夹选择对话框。

You can't use HTML to select folder.
However, you can use Java applet, Flash or other similar technologies in order to show folder selection dialog in your page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文