Skip to content

getCookie(name)

使用 document.cookie 来获取 Cookie 的值。

添加版本 ​

1.0.8

参数 ​

  1. name(string):名称

返回 ​

(string):cookie 值

例子 ​

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