简体   繁体   English

通过jQuery获取目录路径

[英]Get directory path by jquery

To choose the file type there is a Certain input 要选择文件类型,请输入“确定”

<input type="file" id="theFile" />

but I do not want to choose the file, I want to choose a folder from the I? 但是我不想选择文件,我想从I中选择一个文件夹?

That's simply not possible. 那根本不可能。 You can only choose files, but not folders (all files in a folder is fine though). 您只能选择文件,而不能选择文件夹(尽管文件夹中的所有文件都可以)。

To select multiple files, use multiple : 要选择多个文件,请使用multiple

<input type="file" name="whatever" multiple>

“文件”输入类型仅用于读取-选择文件而不是目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM