1.我就是想点击注销退出登录状态 但不跳转页面 有人说是用js清空cookie里的值
具体该怎么做 有大神懂不?以下是前端示例中用到cookie的部分
2.以下是前端页面中用到cookie的部分
<span th:each="cookie :${#httpServletRequest.getCookies()}" >
<ul class="nav navbar-nav navbar-right hidden-sm" >
<li th:if="${cookie.getName().equals('bookstore_user')}" ><a th:if="${cookie.getValue()!=''}" >注销</a></li>
<li th:if="${cookie.getName().equals('bookstore_user')}" ><a th:if="${cookie.getValue()!=''}" href="/order" th:text="${cookie.getValue()}"></a></li>
<li th:if="${cookie.getName().equals('bookstore_user')}" >
<a th:if="${cookie.getValue()!=''}" href="/cart">查看购物车</span></a></li>
</ul>
</span>