자바스크립트 - 쿠키
function setCookie(mName, mValue, mDay)
{
var expire=new Date();
expire.setDate(expire.getDate() + mDay);
cookies = mName + "=" + escape(mValue) + "; path=/ ";
if(typeof mDay != "undefined")
{
cookies += ";expires=" + expire.toGMTString() + ";";
}
document.cookie = cookies;
}
function getCookie(mName)
{
mName = mName + "=";
var cookieData = document.cookie;
var start = cookieData.indexOf(mName);
var mValue = "";
if(start != -1)
{
start += mName.length;
var end = cookieData.indexOf(";", start);
if(end == -1)end = cookieData.length;
mValue = cookieData.substring(start, end);
}
return unescape(mValue);
}