Html 通过锚标记链接到文件共享
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1474702/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 00:55:42 来源:igfitidea点击:
Link to a file share through an anchor tag
提问by Michael Kniskern
How do I format an HTML anchor tag to link to a shared network folder?
如何格式化 HTML 锚标记以链接到共享网络文件夹?
I tried the following and it does not like it.
我尝试了以下方法,但它不喜欢它。
<a href="file:\myserver\myfolder\myfile.docx">My Shared Folder</a>
回答by nickf
Try this URL:
试试这个网址:
<a href="file://///myserver/myfolder/myfile.docx">
回答by Matt
I believe the correct mark up is:
我相信正确的标记是:
<a href="file:///\serverpath\folder\filename.ext">
回答by halocursed
<a href="file:///myserver/myfolder/myfile.docx">My Shared Folder</a>
回答by inkedmn
I think it should formatted like this:
我认为它的格式应该是这样的:
file:///TheComputerNameOrIpAddress/FolderName/myFile.docx
I'm not 100% sure that will work, but it's worth a shot. Good luck.
我不是 100% 肯定这会奏效,但值得一试。祝你好运。