var expiresDate= new Date(); expiresDate.setTime(expiresDate.getTime() + (120*60*1000)); $.cookie('username', res.data.username, { expires: expiresDate, path: '/' });
cookie缓存2小时写法
var expiresDate= new Date(); expiresDate.setTime(expiresDate.getTime() + (120*60*1000)); $.cookie('username', res.data.username, { expires: expiresDate, path: '/' });
cookie缓存2小时写法
转载于:https://www.cnblogs.com/liyinSakura/p/7715847.html