12345678910111213141516171819202122232425262728293031323334353637 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- </head>
- <body>
- <!--
- a标签可以进行链接的跳转
- 属性 href 用来定义链接
- 可以使用相对路径
- 属性 target 用来定义打开的方式
- _blank 是在新窗口中打开
- -->
- <!-- 直接找到同级路径下的页面 此时默认使用的是 ./ -->
- <a id="1" href="hello.html" target="_blank"> 使用blank跳转hello </a>
- <!-- 换行是br 可以没有/ -->
- <br />
- <a href="hello.html" target="_self"> 使用self跳转hello </a>
- <br />
- <a href="hello.html"> 默认跳转到hello </a> <!-- 默认就是在自身窗口中打开 -->
- <br />
- <!-- 指定url地址 -->
- <a href="https://www.koobietech.com/#/" target="_blank">四福科技</a>
- <br />
- <!-- 找其他路径下的页面 先找到当前路径 然后再找到对应的地址-->
- <a href="./base/test.html" target="_blank">test.html</a>
- <br />
- <!-- 如果需要先找到上一个层级 使用 ../ -->
- <!-- 绝对路径 从当前位置开始找其他位置 是相对路径 否则以/开头 代表绝对路径 -->
- <a href="/base/test.html" target="_blank">绝对路径下的base test</a>
- </body>
- </html>
|