首页 > Web开发 > 详细

vue 切换网页导航栏添加logo及标题

时间:2020-07-13 19:43:10      阅读:499      评论:0      收藏:0      [点我收藏+]

index.html

    <title> 网页导航栏添加logo及标题</title>
<link rel="icon" type="image/x-icon" href="/static/anfang_favicon.ico"/>
<script type="text/javascript">
var scene = window.location.host
if (scene === ‘anfang.cn‘) {
document.querySelector(‘link[rel="icon"]‘).href = "/static/anfang_favicon.ico"
document.getElementsByTagName("title")[0].innerText = ‘安防‘;
} else if (scene === ‘xuexiao.cn‘) {
document.querySelector(‘link[rel="icon"]‘).href = "/static/school_facicon.ico"
document.getElementsByTagName("title")[0].innerText = ‘校园云‘;
}
</script>

vue 切换网页导航栏添加logo及标题

原文:https://www.cnblogs.com/luckyShuang/p/13295007.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!