---
id: cookie
title: Cookie
titleEn: Cookie
prev: javascript/validator.html
next: javascript/fastclick.html
source: js/util.cookie.js
doc: docs/javascript/cookie.md
---

# Cookie
---

Cookie 操作方法封装，via [Nicholas C. Zakas](http://www.nczonline.net/)。

调用接口：`$.AMUI.utils.cookie`。

- `cookie.set(name, value, expires, path, domain, secure)` - 设置 cookie；
- `cookie.get(name)` - 获取 cookie；
- `cookie.unset(name, path, domain, secure)` - 删除 cookie

__参考链接__

- https://developer.mozilla.org/en-US/docs/Web/API/document.cookie

