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

时间:2020-07-13 19:43:10   收藏:0   阅读:500

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>

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!