📜  获取浏览器 Cookie - Javascript 代码示例

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

代码示例1
const cookie = name => `; ${document.cookie}`.split(`; ${name}=`).pop().split(';').shift();

cookie('_ga');
// Result: "GA1.2.1929736587.1601974046"