jQuery写入读取Cookie插件

jQuery操作cookie的插件,大概的使用方法如下
example $.cookie(’the_cookie’, ‘the_value’);
设置cookie的值
example $.cookie(’the_cookie’, ‘the_value’, {expires: 7, path: ‘/’, domain: ‘jquery.com’, secure: true});
新建一个cookie 包括有效期 路径 域名等
example $.cookie(’the_cookie’, ‘the_value’);
新建cookie
example $.cookie(’the_cookie’, null);
删除一个cookie

转自:http://www.ijavascript.cn/jquery/cookie-plugin-for-jquery-19.html

cookie插件代码部分我就不贴出来了,网上都有。

posted @ 2012-03-09 11:38  stma  阅读(750)  评论(0)    收藏  举报