如何链接到HTML中的本地/内部网文件?

时间:2014-04-25 14:37:20

标签: html anchor local-files

如何链接到HTML中的本地/内部网文件?

我已经看过this以及其他许多问题,但它并不适合我。不使用Chrome而不使用IE 11.不适用于PDF,WAV或MP3。不是点击,不是右键单击/打开新标签/窗口,而不是拖动。

这是HTML呈现(它是服务器上的Ruby on Rails)。

<table cellspacing="2" cellpading="0px" border="1">
  <thead>
    <tr>
      <th>Verbiage</th>
      <th>Tags</th>
      <th>Language</th>
      <th>Talent</th>
      <th>Audio</th>     
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
      <tr>
        <td>A book</td>
        <td></td>
        <td>English</td>
        <td>Joe</td>
        <td>
        <a href="file:///C:\Ruby193\doc\bookofruby.pdf">C:\Ruby193\doc\bookofruby.pdf</a>
        </td>
        <td><a href="/prompts/12">Show</a></td>
        <td><a href="/prompts/12/edit">Edit</a></td>
        <td><a data-confirm="Are you sure?" data-method="delete" href="/prompts/12" rel="nofollow">Destroy</a></td>
      </tr>
  </tbody>
</table>

1 个答案:

答案 0 :(得分:1)

当我想回答同样的问题时,我发现了这篇文章。以为我会发布对我有用的答案,以防它帮助别人。

对我来说有六个斜线,而三个没有。我的目录信后我也不需要反斜杠。

file://////Z:/filepath/filename.pdf
相关问题