juyss

适用于html中请求地址的理解

    <!--
    相对路径:
        相对于当前访问地址,后加上自己要访问的地址 (../可以用于删除一级目录,即返回上层目录)
    绝对路径:
        相对于在http://ip:port/,后加上自己要访问的地址
    -->


    <!--  原地址: http://localhost:8080/Servlet/first/second/3.html-->

    <!--  点击后: http://localhost:8080/Servlet/index.jsp-->
    相对路径地址跳转:<a href="../../index.jsp">返回首页</a>
    <br>
    <!--  点击后: http://localhost:8080/Servlet/first/second/index.jsp-->
    相对路径地址跳转:<a href="index.jsp">返回首页</a>
    <br>
    <!--  点击后:http://localhost:8080/Servlet/index.jsp-->
    绝对路径地址跳转:<a href="/Servlet/index.jsp">返回首页</a>
    <br>

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-11-27
  • 2021-11-27
  • 2021-10-27
  • 2021-09-29
  • 2021-09-13
  • 2021-05-29
猜你喜欢
  • 2021-09-14
  • 2021-09-21
  • 2021-12-07
相关资源
相似解决方案