-1

I have created some web-interface. And have created a little preload feature (pre-saver) for it, before logging in interface. Trouble is when user came to this interface he must see pre-saver every time - that's annoying. How to do the pre-saver appear one time in a day? As I understand I must use cookie for that, save some parameter in it? Can I do it via jQuery, or I must use php? I had never worked with cookie before, need your help. Thank you!

4

3 回答 3

1

In PHP for 1 day

setcookie("TestCookie",$value, time()+3600*24);
于 2013-04-10T05:59:37.163 回答
0

这里有两个通过javascript设置cookie的现成函数。当心!Cookie 需要服务器才能工作。请改用 localStorage。这是链接:javascript cookie

于 2013-04-10T06:03:22.650 回答
0

好的,谢谢你们的帮助。我找到了一个简洁的资源,但是用俄语:codeharmony.ru/materials/4

它比以前看起来更容易..

于 2013-04-10T09:03:07.830 回答