开发者

Jquery cookies problem

I'm using cookie plugin with jquery. I set cookie like $.cookie('key',开发者_StackOverflow中文版'value'). In firebug I can see that the cookie is set but console.log($.cookie('key')) returns null.

What am I doing wrong ?


Try adding more parameters, only for testing:

$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com' });

To verify the value of the cookie, you can also use the Web Developer Extension, they have an option for view cookies.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜