var oDate = new Date();
oDate.setDate(oDate.getDate() + 5);document.cookie = 'username=leo;expires=' +oDate.toGMTString();
為什么最后要轉換成GMT啊,不能用toLocaelString么?
js中cookie問題?
收到一只叮咚
2018-09-12 13:14:45