<div id="main-div" >
<nav class="navCss" >
<div class="fixed">
<span class="glyphicon glyphicon-wrench spanml"></span>
<a href="/userSetting" style="color: black;margin-left:-5px">个人设置</a>
<span class="glyphicon glyphicon-off spanml"></span>
<a href="/logout" style="color: black;margin-left:-5px">
退出</a>
</div>
</nav>
</div>
jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: /logout
at Function.ga.error (jquery.min.js:2)
at ga.tokenize (jquery.min.js:2)
at ga.select (jquery.min.js:2)
at Function.ga [as find] (jquery.min.js:2)
at m.fn.init.find (jquery.min.js:2)
at new m.fn.init (jquery.min.js:2)
at m (jquery.min.js:2)
at c.show (bootstrap.min.js:7)
at HTMLAnchorElement.<anonymous> (bootstrap.min.js:7)
at Function.each (jquery.min.js:2)
问题:我的a标签里不论写什么值,前台都会报错。根本不跳转链接
看错误提示,又是jquery 又是bootstrap的,猜想,可能是冲突了。
解决:把a标签从 nav里移出来
<div id="main-div" >
<nav class="navCss" >
</nav>
<div class="fixed">
<span class="glyphicon glyphicon-wrench spanml"></span>
<a href="/userSetting" style="color: black;margin-left:-5px">个人设置</a>
<span class="glyphicon glyphicon-off spanml"></span>
<a href="/logout" style="color: black;margin-left:-5px">
退出</a>
</div>