js 浏览器写coke
来源:互联网 发布:小镇姑娘 知乎 编辑:程序博客网 时间:2024/06/01 09:06
/*设置cookie*/
function setCookie(name, value, Days) {
if (Days == null || Days == '') {
Days = 300;
}
var exp = new Date();
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + "; path=/;expires="
+ exp.toGMTString();
}
/* 获取cookie */
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}
function setCookie(name, value, Days) {
if (Days == null || Days == '') {
Days = 300;
}
var exp = new Date();
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
document.cookie = name + "=" + escape(value) + "; path=/;expires="
+ exp.toGMTString();
}
/* 获取cookie */
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
else
return null;
}
0 0
- js 浏览器写coke
- 浏览器环境 js 写文件
- 浏览器端js写csv文件
- 浏览器内写JS测试代码--测试JS
- CSS3免写前缀兼容各大浏览器的JS插件——prefixfree.min.js
- I like coke!!!
- 10626 - Buying Coke
- uva 10626 Buying Coke
- 10626 - Buying Coke
- UVA 10626 Buying Coke
- 10626 - Buying Coke
- UVA - 10626 Buying Coke
- uva 10626 - Buying Coke
- uva 10626 - Buying Coke
- UVA 10626 - Buying Coke
- UVA 10626 Buying Coke
- UVA - 10626 Buying Coke
- UVA - 10626 Buying Coke
- MAC常用命令和常用软件列表
- SDUT 2170 The Largest SCC
- IOS 审核 被拒 及 解决
- Nginx打开目录浏览功能(autoindex)
- 如何用Maven创建web项目(具体步骤)
- js 浏览器写coke
- ViBe前景检测算法
- bzoj 1912: [Apio2010]patrol 巡逻
- 关于rest的一些标注
- 五、SpringBoot JPA 配置redis
- 第十一周 阅读程序(5b)
- SELinux 环境下网络服务设置 , 配置 Apache 、Samba、NFS、vsftp 、MySQL、Bind DNS
- pow()函数自实现
- springMVC post方式乱码解决方案