Gar*_*ett 5 html anchor firefox internet-explorer file
这个Java代码,
"<a href='file:///" + curBP.get_build_path() + "'>" + curBP.get_build_path() + "</a>"
Run Code Online (Sandbox Code Playgroud)
输出到浏览器.
在页面上,HTML是:
<a href="file:///\\path\to\shared\file">Shared File</a>
Run Code Online (Sandbox Code Playgroud)
但是,它不会打开该文件.我尝试了无数其他的斜杠组合,但无济于事.在FireFox中,它的作用类似于死链接,不会打开文件.在IE中,它的工作原理.
有关如何使其在FireFox中工作的任何想法?谢谢!
坏消息:Firefox已经关闭了一个安全漏洞:
http://www.techlifeweb.com/firefox/2006/07/how-to-open-file-links-in-firefox-15.html
它要求用户修改本地文件以允许file:// urls.