使html链接打开文件夹的方法有哪些 [英] What are the ways to make an html link open a folder

查看:287
本文介绍了使html链接打开文件夹的方法有哪些的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要让应用程序的用户通过单击网页内的链接来打开文件夹.文件夹的路径在网络上,可以从任何地方访问.我可能确定没有简单的方法可以做到这一点,但也许我错了?

I need to let users of an application open a folder by clicking a link inside a web page. The path of the folder is on the network and can be accessed from everywhere. I'm probably sure there is no easy way to do this, but maybe I'm mistaken?

推荐答案

是否要在 Windows 资源管理器中打开共享文件夹?您需要使用 file: 链接,但有一些警告:

Do you want to open a shared folder in Windows Explorer? You need to use a file: link, but there are caveats:

  • 如果链接是转换后的 UNC 路径 (file://server/share/folder/),Internet Explorer 将可以工作.
  • 如果链接是使用五个斜杠 (file://///server/share/folder) 的自己的损坏形式,Firefox 将可以使用 并且禁用了对通过 HTTP 提供的页面中的 file: 链接的安全限制.谢天谢地,IE 也接受损坏的链接形式.
  • 无法说服 Opera、Safari 和 Chrome 在通过 HTTP 提供服务的页面中打开 file: 链接.
  • Internet Explorer will work if the link is a converted UNC path (file://server/share/folder/).
  • Firefox will work if the link is in its own mangled form using five slashes (file://///server/share/folder) and the user has disabled the security restriction on file: links in a page served over HTTP. Thankfully IE also accepts the mangled link form.
  • Opera, Safari and Chrome can not be convinced to open a file: link in a page served over HTTP.

这篇关于使html链接打开文件夹的方法有哪些的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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