jquery操作Cookie插件使用
2011-07-14 16:46
513 查看
jquery.cookie.js 提供了jquery中非常简单的操作cookie的方法。
$.cookie('the_cookie'); // 获得cookie
$.cookie('the_cookie', 'the_value'); // 设置cookie
$.cookie('the_cookie', 'the_value', { expires: 7 }); //设置带时间的cookie
$.cookie('the_cookie', '', { expires: -1 }); // 删除
$.cookie('the_cookie', null); // 删除 cookie
$.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});//新建一个cookie 包括有效期 路径 域名等
这个插件默认的过期是按天数计算的
$.cookie('the_cookie'); // 获得cookie
$.cookie('the_cookie', 'the_value'); // 设置cookie
$.cookie('the_cookie', 'the_value', { expires: 7 }); //设置带时间的cookie
$.cookie('the_cookie', '', { expires: -1 }); // 删除
$.cookie('the_cookie', null); // 删除 cookie
$.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});//新建一个cookie 包括有效期 路径 域名等
这个插件默认的过期是按天数计算的
相关文章推荐
- jquery插件如何使用 jQuery操作Cookie插件使用介绍
- jquery插件如何使用 jQuery操作Cookie插件使用介绍
- jQuery的cookie插件使用,jQuery操作cookie,写入,读取,删除
- 【jQuery基础学习】04 jQuery中的表格操作及cookie插件的使用
- jQuery实现换肤功能(使用cookie.js插件)
- JQuery操作cookie插件
- 用jquery实现cookie的操作以及创建js数组和遍历js数组,js对象,jquery.json的使用
- 使用Jquery cookie插件实现用户名和密码的保存
- jquery cookie插件使用
- 使用jquery插件【jquery.cookie】,实现【记住我】功能
- jquery.cookie插件官方下载地址与使用方法
- Cookie操作插件 jQuery.Cookie
- jQuery操作cookie的插件
- Cookie操作插件 jQuery.Cookie
- 使用jquery插件操作哈希表Hashtable的应用
- 使用jquery.cookie操作Cookie实例
- jquery.cookie 插件使用方法
- jquery没有相关操作cookie的函数,但是有一个cookie插件
- 基于jQuery的Cookie操作插件--简单而又没有兼容性问题!
- 使用jquery插件【jquery.cookie】,实现【记住我】功能