创建上传表单,选择文件夹并获取文件夹中的特定文件
要上传单个文件,使用以下 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能使用 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.