分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

html链接路径

发布时间:2023-09-06 01:52责任编辑:郭大石关键词:暂无标签
  • html链接的相对路径与绝对路径
  • 绝对路径
      • 完整的一个路径就是绝对路径,即包含schema://host[:port#]/path/.../[?query-string][#anchor]
      • 例:http://news.sina.com.cn/world/
    • 相对路径
      • 第一个字符为斜杠/,   redirect(‘/hello‘)   
        • 例:“/hello”,     这种会自动帮你添加你的协议名+域名+端口, 假设你的前一节为http://www.baidu.com:8000/aa, 系统会自动匹配为"http://www.baidu.com:8000/hello"
        • 我们实际情况中一般使用这种
 
  • 第一个字符不带斜杠      redirect(‘hello/‘)
    • 例:“hello”,  这种会在当前url中path段往后添加,假设你当前路径http://www.baidu.com:8000/aa, 系统会自动匹配为“http://www.baidu.com:8000/aa/hello, ”

html链接路径

原文地址:https://www.cnblogs.com/tangpg/p/9004049.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved