relative link for directory above

妖精的绣舞 提交于 2019-11-30 17:07:34

问题


I've got a file structure like so

Root
-index.html
-adirectory
 ->fileinthedirectory.html

I'd like to create a relative link from fileinthedirectory.html to index.html since /index.html links to /adirectory/index.html which doesn't exist.


回答1:


To go up one directory you can use:

 ../index.html

or you can start the URL with a slash to start from the root

 /index.html


来源:https://stackoverflow.com/questions/4648438/relative-link-for-directory-above

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!