Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于基于 Windows/Linux 的浏览器,我可以使用 Java 插件来访问文件系统。由于 IOS 不支持 Java,有没有其他方法可以完成它?
不,你不能。无法在 iOS Safari 中上传甚至下载文件。在 iCab 中,您可以上传,<input type = 'file'>但不能访问文件系统。从浏览器访问整个文件系统将是一场安全灾难。而且java插件也不能访问整个文件系统。
<input type = 'file'>
这取决于你想做什么。如果您只想让用户导航到感兴趣的文件,然后将其上传到服务器进行处理,您可以<input type='file'>在 HTML 中使用。如果您需要更多功能,您必须在浏览器中实现原生插件或使用 Flash。
<input type='file'>