链接到本地​​磁盘 [英] link to local disk

查看:101
本文介绍了链接到本地​​磁盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



像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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆