Is it possible to open a file from the parent folder?
是否可以从父文件夹中打开文件?
lets say I have this file tree
假设我有这个文件树
parent
other
file.pdf
website
index.html
and I wanted to open file.pdf from index using the a
tag, how would I do it? Is it possible?
我想使用a标签从index打开file.pdf,我该怎么做?可能吗?
3 个解决方案
#1
3
Use the "special instruction" ..
to traverse "up" a directory level:
使用“特殊指令”..遍历“向上”目录级别:
<a href="../other/file.pdf">file.pdf</a>
It can be repeated multiple times to continue traverse up the folder hierarchy.
它可以重复多次以继续遍历文件夹层次结构。
#2
1
Use double dot to go one level up:
使用双点向上一级:
<a href="../other/file.pdf">file.pdf</a>
#3
1
Yes, you simply give the full path in the href
是的,您只需在href中给出完整路径
<a href="../other/file.pdf">link</a>
#1
3
Use the "special instruction" ..
to traverse "up" a directory level:
使用“特殊指令”..遍历“向上”目录级别:
<a href="../other/file.pdf">file.pdf</a>
It can be repeated multiple times to continue traverse up the folder hierarchy.
它可以重复多次以继续遍历文件夹层次结构。
#2
1
Use double dot to go one level up:
使用双点向上一级:
<a href="../other/file.pdf">file.pdf</a>
#3
1
Yes, you simply give the full path in the href
是的,您只需在href中给出完整路径
<a href="../other/file.pdf">link</a>