日期:2014-05-17 浏览次数:20528 次
HttpCookie hcUser = new HttpCookie("User"); hcUser.Values.Add("username", Login1.UserName); hcUser.Values.Add("password", Login1.Password); hcUser.Expires = DateTime.Now.AddDays(30); Response.Cookies.Add(hcUser);
function deleteCookie(name, path, domain) { if (getCookie(name)) document.cookie = name + '=' + ((path) ? ';path=' + path : '') + ((domain) ? ';domain=' + domain : '') + ';expires=Thu, 01-Jan-1970 00:00:01 GMT'; }
function ExitClientClick(e) { deleteCookie("User"); }