开发者

Cookie not set. Why?

I wanna set a cookie with jQuery, I went through some Qestions with similar title in stackoverflow, but they didnt solved the problem

here is my code

      $(document).ready(function() {
      alert("Test");

      $.cookie('iwiNews', 'login', { path: '/', expires: 1 });
      alert( $.cookie("iwiNews") );
      });

I also tried

          $(document).ready(function() {
      alert("Test");

      $.cookie('iwiNews', 'login');
      alert( $.cookie("iwiNews") );
      });

and

开发者_开发问答
          $(document).ready(function() {
      alert("Test");

      $.cookie('iwiNews', 'login' {expires: 1 });
      alert( $.cookie("iwiNews") );
      });

The alert "Test" is to check if the actionhandler works, the alert wich returns the cookie value doesnt fire at all. The coodie isnt set if I look up the cookie list in Firefox. Somebody has an Idea why? thanks a lot in advance, daniel

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜