function SetCookie(name, value) {
var exp = new Date();
exp.setTime(exp.getTime() 3 * 24 * 60 * 60 * 1000) //有効期限は 3 日です
document.cookie = name "="エスケープ(値) ";expires=" exp.toGMTString();
true を返す;
};
function getCookie(name) {
var arr = document.cookie.match(new RegExp("(^| )" name "=([^;]*)(;|$)"));
if (arr != null) return arr[2]; return null;
var currentServiceAliasName = getCookie("appName");
var displayName = "";
if (currentServiceAliasName != null && currentServiceAliasName != " " && currentServiceAliasName != "unknown")
displayName = decodeURIComponent(currentServiceAliasName) " . " counterName;
else
displayName = counterName;
decodeURIComponent これを使用して、変換してください