解释 href 如何只用 '/' 链接到新网页?
Explain how href with only '/' links to new webpage?
我从源页面获取了这个 html 代码,当我单击下面的 link 时,它会将我带到新网页。我知道您需要有一个适当的整页 link("www.example.com") 从一页移动到另一页。
<a href="/go/Internship/2432300/" title="Internship">Internship</a>
有人可以向我解释发生了什么以及它是如何工作的吗?
是相对路径。
相对路径
index.html
/graphics/image.png
/help/articles/how-do-i-set-up-a-webpage.html
绝对路径
http://www.example.com
http://www.example.com/graphics/image.png
http://www.example.com/help/articles/how-do-i-set-up-a-webpage.html
http://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/
我从源页面获取了这个 html 代码,当我单击下面的 link 时,它会将我带到新网页。我知道您需要有一个适当的整页 link("www.example.com") 从一页移动到另一页。
<a href="/go/Internship/2432300/" title="Internship">Internship</a>
有人可以向我解释发生了什么以及它是如何工作的吗?
是相对路径。
相对路径
index.html
/graphics/image.png
/help/articles/how-do-i-set-up-a-webpage.html
绝对路径
http://www.example.com
http://www.example.com/graphics/image.png
http://www.example.com/help/articles/how-do-i-set-up-a-webpage.html
http://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/