https://yq.aliyun.com/articles/65638?spm=5176.100240.searchblog.18.unJBm0
//key , value , 有效期 , 路径
$.cookie('startCity', $(this).text(), {expires:7, path:'/'});
//获取cookie
var startCity = $.cookie('startCity');
//得到cookie对象,有效期设置为1天
Cookies ck = new Cookies(1);
ck.setMaxAge(-1);//设置为-1表示关闭所有浏览器后cookie自动失效
//存放会员编号到cookie
ck.putCookie("key", "value");