javascript cookie 有效时间一个月怎么写?

https://img3.mukewang.com/5bb4b6c80001d98f07330748.jpg

//设置cookie
cookie.set("name","nicholas");
cookie.set("book","Professional Javascrpit");

//读取cookie的值
cookie.get("name");
cookie.get("book");

cookie.set("name","NIcholas","/books/projs/","www.wrox.com",new Date("2016,8,28"));
请问我想设置 cookie有效时间1个月怎么做啊?
 而不是通过日期,比如30 啥弄的?


墨色风雨
浏览 1021回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript