Cookie Plugin for jQuery
A few simple examples of how to use it:
$.cookie('the_cookie'); // get cookie
$.cookie('the_cookie', 'the_value'); // set cookie
$.cookie('the_cookie', 'the_value', { expires: 7 }); // set cookie with an expiration date seven days in the future
$.cookie('the_cookie', '', { expires: -1 }); // delete cookie
download:
http://dev.jquery.com/browser/trunk/plugins/cookie/
设置cookie过期时间
<script type="text/javascript">
var cookie = document.cookie;
if(cookie.indexOf("flash") == -1) {
var expire = new Date();
expire.setTime(expire.getTime() + 3600000); //设置过期时间
document.cookie = "flash;expires="+expire.toGMTString();//key值和过期时间
document.location.href = 'index.html';
}
</script>
分享到:
相关推荐
A simple, lightweight jQuery plugin for reading, writing and deleting cookies. ## Installation Include script *after* the jQuery library (unless you are packaging scripts somehow else): ...
使用时只要在页面中引入jquery.js、jquery.cookie.js、jquery.treeview.js(树形菜单的方法)、 jquery.treeview.css即可。同时保证jquery.treeview.css文件和images文件夹的相对位置,在同一目录下即可
倒计时器#Introduction 使用 jquery cookie 倒计时。 在这些项目中使用的是 jQuery Cookie Plugin v1.4.1。 谢谢你。 (:
前言 在开发过程中,因为之前有接触过Discuz,就直接拿其common.js里面的getcookie和setcookie方法来使用,做到后面在使用IE来测试的时候,发现这两个方法子啊IE下不起作用,就请教同事,这样就有了jquery.cookie.js...
一个可定制的jQuery插件,用于添加横幅和阻止脚本,符合EU Cookie法。 包括文件 <!-- Cookie Banner core CSS file --> < link rel =" stylesheet " href =" cookie-banner.css " > <!-- jQuery --&...
jQuery Cookie同意插件(WIP) 一个显示cookie的轻量级jQuery插件 :cookie: 欧盟法规要求的同意消息。 该插件会在用户首次访问您的网站时显示一条消息,默认情况下会在用户最后一次访问后30天再次显示一条消息。 ...
jQuery插件以显示Cookie的同意模式并添加Google Analytics(分析)标签: 目录 快速开始 下载版本: 下载 或克隆仓库: git clone https://github.com/avantage-digital/cookieKit.git 导入库插件: < script ...
jCookie-一个jQuery-Plugin,为与CRUD相关的cookie处理提供方便的api 例子 创建和更新: jQuery.jCookie('cookie','value'); 删除: jQuery.jCookie('cookie',null); 阅读: jQuery.jCookie('cookie'); ...
jQueryCookie 免责声明(版本 1.1.0) 根据欧盟法律的 jquery cookie 免责声明栏概述此插件加载一个免责声明栏,您可以在其中显示一些... link rel =" stylesheet " href =" plugin/path/css/jquery.cookieDisclaimer.
js简洁的Tree Sarrissa & jQuery XSLT plugin (needed for XML source option - see config section) jQuery metadata plugin ...jQuery cookie plugin (needed for cookie functionality - see config section)
:mechanical_arm: Cookie插件 :package: WordPress,jQuery v1.0.0 欢迎使用Cookie插件的存储库。 这是我在我的课程“使用JQuery进行Wordpress插件开发”中为学生制作的Wordpress插件,您可以在Udemy上找到它。 ...
Cookie support for saving client-side customizations (now available) RTL Support (now available) Adding LESS files as well as Javascript client-side template files such as Mustache. (now available) ...
* Fix conflict with plugin using Google Library Javascript for jQuery. Example : "Use Google Libraries" * Add an option for choose input text or textarea for old tags field * Add an option for min ...
目的:前端(只采用thymeleaf模板+jquery) 实现国际化 ...a jQuery plugin that makes it easy to internationalize your web site 步骤: 1 html <!DOCTYPE> <html lang="en"> <head>
-enable-sockets选项编译) jQuery 和 jQuery Cookie 插件纯的我使用的版本: [ 'Apache' => ['2.2.26', '2.4.9'], 'PHP' => ['5.5.9', '5.6.0beta3', '5.6.0beta4'], 'jQuery' => '2.2.1', 'jQuery Cookie Plugin' ...
Storage.js v2.0 如果您已经使用Storage.js创建了一个或多个站点,或者知道一个或多个站点,则将其URL添加到官方的。... script src =" http://cdn.jsdelivr.net/cookiejs/0.1/cookie.min.js " > </
jQuery Cookie: https://github.com/carhartl/jquery-cookie Switchery: http://abpetkov.github.io/switchery/ Powerange: http://abpetkov.github.io/powerange/ X-Editable: ...
加载核心Angular模块(ng,touch,资源,cookie,消息,动画,touch)以及angular-ui-router。 (跳过ng-touch)。 不包含任何样式。 (如果您是入门者,则可能需要本身。) 变更日志 0.1.3 2015-02-27添加选项以在...