Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在html中创建远程服务器中文件的锚_Html_File_Download_Anchor_Remote Server - Fatal编程技术网

如何在html中创建远程服务器中文件的锚

如何在html中创建远程服务器中文件的锚,html,file,download,anchor,remote-server,Html,File,Download,Anchor,Remote Server,我正在公司内部网中创建一个本地门户网站。在一个页面中,我需要提供远程服务器中一些excel工作表的链接 urlFile='file://ed1/cf/a/b/c.xls'; var regRsltLink = $("<a />", { href : urlFile, text : "heading", }).appendTo("#legPassRate"); 浏览器:对于Chrome、Safari和Opera来说,由于其安全模型,这是不可能的。然而,Ch

我正在公司内部网中创建一个本地门户网站。在一个页面中,我需要提供远程服务器中一些excel工作表的链接

urlFile='file://ed1/cf/a/b/c.xls';
var regRsltLink = $("<a />", {
       href : urlFile,
       text : "heading",
}).appendTo("#legPassRate");

浏览器:对于
Chrome
Safari
Opera
来说,由于其安全模型,这是不可能的。然而,
Chrome
有一些解决方案,这是可能的,但它有两个要求:

  • 您需要让用户安装
  • 它必须在https://
  • 对于
    Firefox
    ,您可能会遇到同样的问题,因为它通常需要
    LocalLink


    但是,它在
    Internet Explorer上运行良好
    ,因此,如果您的intranet用户将使用它,那么没有问题
    file://ed1/cf/a/b/c.xls