保存值
// 设置域
$.cookie(key, value, {expires: 7, path: '/', domain: classapi.domain, secure: false});
// 不设置域
$.cookie(key, value, {expires: -1, path: '/', secure: false});
删除值
// 设置域
$.cookie(key, null, {expires: -1, path: '/', domain: classapi.domain, secure: false});
// 不设置域
$.cookie(key, null, {expires: -1, path: '/', secure: false});
保存值
window.localStorage.setItem(key, value);
删除值
window.localStorage.removeItem(key)
读取值
window.localStorage.getItem(key)