删除jquery中的Cookie问题

时间:2019-05-28 08:53:28

标签: javascript jquery cookies

//add cookie using this methos it was working
$.cookie('demo','value',{expire:1});
// remove cookie using this method it was not working
$.removeCookie('demo');
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

我正在尝试使用jQuery方法(例如$.removeCookie())删除cookie,但是此方法返回false。我该如何解决?

0 个答案:

没有答案