我创建了一个链接:
< a href =“file:/// c:/mysite/myfile.docx”> myfile< / a>
但是FireFox没有打开链接.虽然href =“http://localhost/myfile.docx”工作正常 – 它让我下载文件.
任何想法我怎么能这样做?
也许在firfox选项/安全设置中改变一些东西?
如果你在这里,有没有机会在IE8中做到这一点?
谢谢.
解决方法
https://superuser.com/questions/103026/open-a-direct-file-on-the-hard-drive-from-firefox-file
Firefox和IE8都支持File URI scheme.
Here are some examples valid for
Windows systems,referring to the same
file c:\WINDOWS\clock.avifile://localhost/c|/WINDOWS/clock.avi
file:///c|/WINDOWS/clock.avi
file://localhost/c:/WINDOWS/clock.avi
file:///c:/WINDOWS/clock.avi显然(来自同一个网址):
Mozilla browsers refuse to follow file URLs on a page that it has fetched with the HTTP protocol.
但:
Mozilla browsers can be configured to override this security restriction as detailed in Mozillazine’s “07002”.
原文地址:https://www.jb51.cc/html/223910.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。