插件地址:https://plugins.jquery.com/cookie/
添加cookie
$.cookie('name', "内容", {
expires:365,
path: '/',
domain: 'mingfuba.com',
secure: false
});
$.cookie(名称,内容, {
expires: 天数,
path: 目录,
domain: 域名,
secure: 是否进行https发送,是true,不是false
});
获取cookie
$.cookie('名称');
删除cookie
$.cookie('名称', null, {
expires: -1,
path: '/',
domain: '域名',
secure: false
});