Home >Web Front-end >JS Tutorial >JS cookie Chinese garbled solution_javascript skills
function getCookie(name) {
var arr = document.cookie.match(new RegExp("(^| )" name "=([^;]*)(;|$)"));
if (arr != null) return arr[2]; return null;
};