function getCookie(name)...{
var value = document.cookie;
var arr1 = value.split(";");
for(i=0;i
return cookie
//Somewhat similar to an anonymous class
var expires = function()...{//The cookie expiration time is within 48 hours from creation
var mydate = new Date();
mydate.setTime(mydate. getTime + 48*60*60*1000);
,, ,, " = " + SVALUE +"; Expires = " + Expires;}} else ... {
Alert (" You fill in free! "); sName,sValue)...{//Delete a specified cookie key-value pair
Document.cookie = sName + "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT; ";
}
/**//****************************************
Set cookie content
* ******************************************/
function DelCookie(sName)...{
var sValue=getCookie(sName);
if(sValue!=null)...{
document.cookie = sName + "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
}
/**//******************************************
Delete cookies
*** ****************************************/
function clearCookie()...{
var value = document.cookie;
var arr1 = value.split(";");
for(i=arr1.length-1;i>=0;i--)...{
if(value. length == 0) ... {
Break;
}
sname = Arr1 [i] .split ("=") [0]; document.cookie = sName + "=" + escape(sValue) + ";expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
}