好的,所以使用带有像“file:///C:/whatever/somefile.txt”这样的 href 的锚点是很简单的,直到浏览器安全性出现问题为止。我可以通过将设置放入 user.js 文件来让它们在 Firefox 中工作,但在 IE9 中,无论我使网站多么“可信”以及我启用了多少功能,它们都不起作用。当您单击带有 href 的链接(如“file:///c:/temp/list.png”或“file:///c:/”)时,不会发生任何情况,而在 Firefox(和适当的设置)中,文件或目录均显示成功。在 IE 中,使用 javascript 并尝试使用此类 href 的“window.location=”会导致“访问被拒绝”异常,而在 Firefox 中(使用合适的设置)也可以正常工作。一直在寻找有关它的信息,但没有找到任何信息。任何人都可以建议 IE9 需要什么吗?
Ok, so using an anchor with an href like "file:///C:/whatever/somefile.txt" is straightforward, until browser security gets in the way. I can get them to work with Firefox by putting settings in a user.js file, but with IE9, no matter how 'trusted' I make the site and how many things I enable, they just don't work. Nothing happens when you click on the link with href like "file:///c:/temp/list.png" or "file:///c:/", while in Firefox (and suitable settings) the file or directory are both shown successfully. In IE, using javascript and attempting 'window.location=' with that sort of href leads to an 'Access is denied' exception, while in Firefox (with suitable settings) that works fine too. Have been looking all over for information about it, but not found any. Can anyone advise on what's needed in the case of IE9?
发布评论
评论(1)
您可能应该阅读 http://blogs.msdn.com/b/ieinternals/archive/2011/08/12/internet-explorer-9.0.2-update-changes-file-protocol-and-cookie-naming。 aspx 开始。然后,您应该使用您正在使用的确切 FILE:// URI 更新您的问题,并解释当您尝试使用此语法时具体会发生什么。
You should probably read http://blogs.msdn.com/b/ieinternals/archive/2011/08/12/internet-explorer-9.0.2-update-changes-file-protocol-and-cookie-naming.aspx to start. Then you should update your question with the exact FILE:// URI that you're using, as well as an explanation of what specifically happens when you try to use this syntax.