📜  获取所有 cookie - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:30.950000             🧑  作者: Mango

代码示例2
let c = document.cookie.split(";").reduce( (ac, cv, i) => Object.assign(ac, {[cv.split('=')[0]]: cv.split('=')[1]}), {});

console.log(c);