function getCookie(name)...{
var value = document.cookie;
var arr1 = value.split(";");
if(value.length == 0)...{
break;
if(sName==name)...{
return arr1[i].split("=")[1];
}
}
return null }
/ return null cookie
//有點類似與匿名類型
var expires = function()...{//cookie失效時間為從建立起48小時一內
ate. getTime + 48*60*60*1000);
return mydate.toGMTString();
} document.cookie = sName + " =" + sValue + ";expires=" + expires;
}else...{
alert("您的填寫 sName,sValue)...{//刪除一個指定的cookie鍵值對
document.cookie = sName + "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT; ";
}
/**//*****************************************
設定cookie的內容
* ******************************************/
function DelCookie(sName)...{
var sValue=getCookie(sName);
+ "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
}
/**//*****************************************
刪除cookie
*** ****************************************/
}
/**//*****************************************
刪除cookie
*** ****************************************/
}
/**//*****************************************
清空cookie
*** ****************************************/ )...
var value = document.cookie;
var arr1 = value.split(";");
for(i=arr1.length-1;i>{n--1 length == 0)...{
break;
}
arr1[i].split("=")[1]
document.cookie = sName + "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
}