无官方支持,有插件实现。 比如:https://github.com/carhartl/jquery-co...补充插件使用法 创建 cookie:$.cookie('the_cookie', 'the_value');创建有效期7天的 cookie:$.cookie('the_cookie', 'the_value', { expires: 7 });创建有效期7天的整站 cookie:$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' }); 读取 cookie:$.cookie('the_cookie'); // => "the_value" $.cookie('not_existing'); // => null删除 cookie:// cookie 存在是返回 true,否则返回 false $.removeCookie('the_cookie'); // path 路径要和创建的时候一致 $.removeCookie('the_cookie', { path: '/' });
无官方支持,有插件实现。
补充插件使用法比如:https://github.com/carhartl/jquery-co...
创建 cookie:
创建有效期7天的 cookie:
创建有效期7天的整站 cookie:
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });
读取 cookie:
删除 cookie: