标签:
function SetCookie(name,value) { //此 cookie 将被保存 30 天(可活动配置) var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); } //取cookies函数 function getCookie(name) { var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); if(arr != null) return unescape(arr[2]); return null; }
标签:
原文地址:http://www.cnblogs.com/yzenet/p/4861036.html