js写cookie
function setCookie(name, value) {
var today = new Date();
var expires = new Date();
expires.setTime(today.getTime() + 1000 * 60 * 60 * 24 * 2000);//设置过期时间
//name cookie名称 value cookie值 escape() 函数可对字符串进行编码
parent.document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString();
}
后台 ASP.NET取COOKIE
HttpUtility.UrlDecode(Request.Cookies["name"].Value);//使用UrlDecode进行解码