javascript
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];} |
{"type":"编程笔记"}
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];} |