How to give a link to a directory in HTML?
My开发者_如何学编程 problem is giving a link to a directory, in an inner network. It is working for IE 6 but i need to do this for especially for IE7 and IE8.
My internal Link is like that: \CompName\Report\
I tried to do this with : file://.... but it didn't work. Any ideas?
There are several different ways to use the file
URI schema and it does respect relative paths.
They are however, platform specific, so may only work on one of windows/mac/linux.
Make sure you get the relative path correctly.
file://CompName/Report
You may need to double up any /
for each "\" you have - UNC paths start with \\
, so this would translate to ////
, so:
file://///CompName/Report
Should work, assuming it is a shared directory on a computer called CompName
and that you have the correct permissions to access it.
This should work:
file://///CompName/Report/
Note that IE8 (and I believe IE7 as well) will open the link in an explorer window (not Internet Explorer).
精彩评论