//设置cookie function setCookie(cname,cvalue,exdays){ var d = new Date(); d.setTime(d.getTime()+(exdays*24*60*60*1000)); var expires = "expires="+d.toGMTString(); document.cookie = encodeURIComponent(cname) + "=" + encodeURIComponent(value) + "; " + expires;}//获取cookiefunction getCookie(cname){ var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i
// 删除cookie function unsetCookie(name) { document.cookie = name + "= ; expires=" + new Date(0); }