关于Html的a标签路径问题

1、相对路径跳转的方法如下:

   相对路径下一般使用:

./表示 当前目录

../表示 父级目录

/ 表示根目录

例如:<a href="../hello.html"></a>

以上代码会跳转到上一目录的hello.html

2、绝对路径跳转的方法如下:

1:

<a href="c:/first/hello.html"></a>

猜你喜欢

转载自blog.csdn.net/shuzishij/article/details/82048034