Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们可以在 HTML 中创建相对链接吗?例如,如何在此页面上编写相对 URL
http://www.example.com/dir/sub-dir
到这个子页面
http://www.example.com/dir/sub-dir/sub-sub-dir
这在 HTML 中是否可行?
你可以这样做:
<a href="./sub-sub-dir">LINK1</a>
要不就
<a href="sub-sub-dir">LINK2</a>
http://www.w3.org/TR/WD-html40-970917/htmlweb.html
好吧....只是相对地写它:
<a href="sub-sub-dir">Text</a>