jquery.cookie.js的用法
2011-09-22 10:04
369 查看
jquery.cookie.js是jQuery的一个插件,其基本用法如下:
<script type="text/javascript"src="/js/jquery.cookie.js"></script>
$.cookie('the_cookie'); // getcookie
$.cookie('the_cookie', 'the_value'); // setcookie
$.cookie('the_cookie', 'the_value', { expires: 7}); // set cookie with an expiration date seven days in thefuture
$.cookie('the_cookie', '', { expires: -1 }); //delete cookie
$.cookie('the_cookie'); //读取Cookie值
$.cookie(’the_cookie’, ‘the_value’); //设置cookie的值
$.cookie(’the_cookie’, ‘the_value’, {expires: 7, path: ‘/’, domain:‘jquery.com’, secure: true});//新建一个cookie 包括有效期 路径 域名等
$.cookie(’the_cookie’, ‘the_value’); //新建cookie
$.cookie(’the_cookie’, null); //删除一个cookie
<script>
<script type="text/javascript"src="/js/jquery.cookie.js"></script>
$.cookie('the_cookie'); // getcookie
$.cookie('the_cookie', 'the_value'); // setcookie
$.cookie('the_cookie', 'the_value', { expires: 7}); // set cookie with an expiration date seven days in thefuture
$.cookie('the_cookie', '', { expires: -1 }); //delete cookie
$.cookie('the_cookie'); //读取Cookie值
$.cookie(’the_cookie’, ‘the_value’); //设置cookie的值
$.cookie(’the_cookie’, ‘the_value’, {expires: 7, path: ‘/’, domain:‘jquery.com’, secure: true});//新建一个cookie 包括有效期 路径 域名等
$.cookie(’the_cookie’, ‘the_value’); //新建cookie
$.cookie(’the_cookie’, null); //删除一个cookie
<script>
相关文章推荐
- jquery.cookie.js 用法
- jquery.cookie.js 用法
- jquery.cookie.js 用法
- jquery.cookie.js用法
- jquery.cookie.js调用 用法
- jquery插件 jquery-plugin-cookie.js用法
- JQuery.Cookie.Js 用法详解
- jquery.cookie.js用法详解
- jquery.cookie.js 用法 jquery获取当前cookie
- jquery.cookie.js用法实例详解
- jquery.cookie.js用法实例详解
- jQuery.cookie.js用法
- jquery.cookie.js用法
- jquery.cookie.js的用法
- jquery.cookie.js 用法
- jquery.cookie.js用法实例详解
- jQuery cookie的用法,及js操作cookie文档
- jquery.touchSwipe.min.js 的简单用法
- jquery.cookie.js插件使用方法
- jQuery插件之jQuery.Form.js用法实例分析(附demo示例源码)