有一个类似这样链接:
<a href="file://server/directory/file.xlsx" target="_blank">Click me!</a>
希望点击‘Click me!’之后能够直接打开/下载文件。但是现在的效果是点击没有任何反应。
在stackoverflow上面有个解决方案:http://stackoverflow.com/questions/101574/how-to-open-an-external-file-from-html
但是,按攻略把路径多加了n个“/”之后,chrome后台抛错:
“Not allowed to load local resource: file:///....”
求助各位大神!
题目看得不是特别明白,外部文件用http协议不行么?
http://www.xxx.com/file.doc
<a href="file://server/directory/file.xlsx" target="_blank" download="file.xlsx">Click me!</a>