Firefox 中的锚标记问题

Anchor tag issue in Firefox

我有一个 HTML 文件,其中包含带有指向另一个 HTML 文件的 link 锚标记。 当我在 firefox 中单击 link 时,它不会打开另一个 HTML 文件。请参考以下 HTML 片段:

<html>
<body>
    <table align=left border=1>
        <tr><th>Report Name</th></tr>
        <tr><td><a href="G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a></td></tr>
    </table>
</body>

问题是当 "href" 中的 link 被点击并在新的 Firefox window 中打开 "G"(大写字母)"g" (小写字母)显示在 Firefox 中,但我没有显示错误页面。我很难理解为什么 Firefox 将大写的 "G" 作为小写字母 "g"。 有人可以帮我吗?

但是,当我在 Chrome 或 IE 中打开相同的 link 时,它的打开很好。

锚的规范需要一个有效的 uri 协议作为 href: 即 fileftpmailto 或 url 片段 #

https://developer.mozilla.org/en/docs/Web/HTML/Element/a#attr-href

在您的示例中,它认为您需要 file

这应该适用于您的情况:(还要检查以转义它,有些浏览器会做一些奇怪的不同事情)

<a href="file:///G:\parent directory\Report\Forms Report Summary_2015-08-25 102050.html" target=report_page>Missing Forms Report</a>