开发者

How to append values to a cookie instead of overriding the existent values in JavaScript?

For example for the following cookie:

Cookie name: favAnimal
Existent value: donkey

I want to append this value:

tiger

without deleting donkey. How to do that? I know I can read the current cookie value, add tiger to that and set the new string as the new cookie value but was wonderi开发者_高级运维ng if there was a better way.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜