当前位置: 首页> 健康> 养生 > html 单页面路由模式hash和history

html 单页面路由模式hash和history

时间:2025/7/12 2:22:01来源:https://blog.csdn.net/weixin_45979310/article/details/141960356 浏览次数:0次

文章目录

    • Hash 模式
    • H5的history模式

Hash 模式

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title>
</head>
<body><nav class="nav-box"><a href="#/">首页</a><a href="#/about">关于</a><a href="#/product">产品</a></nav><div id="app"></div><script>const app = document.querySelector('#app')
关键字:html 单页面路由模式hash和history

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: