链接到本地磁盘 [英] link to local disk
问题描述
像c:/myFolder/myfile.xls
这个网页实际上并不在网上,但是这个功能只是用于演示目的。当网页在网上时,文件也是如此,并且链接具有网址值。
这将是一件有风险的事情。由于不是每个人都使用PC,所以对于Mac和Linux而言,PC和PC不同。并非所有浏览器都允许您执行此操作,例如Firefox,但由于潜在的安全风险,它不允许执行此操作。但无论如何这里是html代码,如果你仍然希望这样做:
< a href =file:/// C :/myFolder/myfile.xls>点击此处< / a>
Is it possible to put a html link on a page that opens a file in local disk?
Like c:/myFolder/myfile.xls
This page is not actually going to be on web, but this feature would be needed for demostration purposes only. When the page is on web, the file is too, and link has url value.
This would be a risky thing to do. As not everybody uses a PC, it will be different for a mac and a linux than a PC. Also not all browsers allow you to do it, such as Firefox, it dis-allows it due to potential security risks. But anyway here's the html code if you still wish to do it:
<a href="file:///C:/myFolder/myfile.xls">Click Here</a>
这篇关于链接到本地磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!