Add the getCookie function

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8490 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-06-15 10:02:55 +00:00
parent 2810dffb8c
commit f9b695f734

View file

@ -902,6 +902,11 @@ function setCookie(name, value, expire, path) {
document.cookie = s_cookie;
}
function getCookie(name) {
var match = document.cookie.match(new RegExp(name+'=(.*?);'));
if(match) return unescape(match[1]);
}
function is_def(v) {
return (typeof(v)!='undefined');
}