【发布时间】:2014-01-27 05:26:39
【问题描述】:
在这里使用jQuery.cookie:
// Do stuff
$.cookie('something', 'yes', {
domain: 'example.com',
httpOnly: false,
path: '/',
expires: 10,
secure: true
});
// Do other stuff...including using the cookie value right away
所有浏览器都做同样的事情吗?
【问题讨论】:
-
jQuery.cookie()是document.cookie的助手,它是标准化的,并且是同步的。
标签: javascript cookies jquery-cookie