Функция чтения cookies (JavaScript)
function readCookie(n) { n = n.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"); n = RegExp("(?:^|;)\\s?" + n + "=(.*?)(?:;|$)", "i"); return (n = document.cookie.match(n)) && unescape(n[1]) } |
P.S.: This function reads browser cookies ;)