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>