JQuery 源JS:
使用方法:
提供方便方法操作cookie :
$.cookie('the_cookie'); // 获得cookie
$.cookie('the_cookie', 'the_value'); // 设置cookie
$.cookie('the_cookie', 'the_value', { expires: 7 }); //设置带时间的cookie 7天
$.cookie('the_cookie', '', { expires: -1 }); // 删除
$.cookie('the_cookie', null); // 删除 cookie
设置cookie的名值对,有效期,路径,域,安全
$.cookie(’name’, ‘value’, {expires: 7, path: ‘/’, domain: ‘jquery.com’, secure: true});
如果在action中出现乱码,需URLDecoder.decode(cookievalue,"utf-8")