1.引入相应JS
<script src="web/js/jquery-1.9.1.min.js"></script>
<script src="web/js/jquery.cookie.js"></script>
2.保存cookie
$.cookie("名称","值")
$.cookie("名称","值",{expires:失效时间})
3.获取cookie
$.cookie("名称")
4.删除cookie
$.cookie("名称",null)
1.引入相应JS
<script src="web/js/jquery-1.9.1.min.js"></script>
<script src="web/js/jquery.cookie.js"></script>
2.保存cookie
$.cookie("名称","值")
$.cookie("名称","值",{expires:失效时间})
3.获取cookie
$.cookie("名称")
4.删除cookie
$.cookie("名称",null)
转载于:https://www.cnblogs.com/-scl/p/7766744.html