yuweijun'blog
Saturday, August 23, 2008
Get Cookie value
function getCookie(cookie) {
var reg = new RegExp("(?:^|\\s+)" + cookie + "=(.+?)(?:;|$)", "i");
var match = document.cookie.match(reg);
// if (match) return RegExp.$1;
if (match) return match[1];
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment