function setCookie(name,value,iDay){
if(iDay){
varoDate=newDate();
oDate.setDate(oDate.getDate()+iDay);
document.cookie=name+'='+value+';path=/;expires='+oDate;
}else{
document.cookie=name+'='+value+';path=/;';
}
};
function getCookie(name){
var arr=document.cookie.split('; ');
for(vari=0;i
var arr2=arr[i].split('=');
//arr2[0]
if(arr2[0]==name){
returnarr2[1];
}
}
return'';
}
function removeCookie(name){
setCookie(name,'任意值',-10);
}
网友评论