let curTime = new Date();
// 设置距离当前时间30天后cookit过期
curTime.setDate(curTime.getDate() + 30);
document.cookie = `username=yue;expires=${curTime};path=/`
Cookie——设置cookie
于 2022-05-10 12:56:25 首次发布
let curTime = new Date();
// 设置距离当前时间30天后cookit过期
curTime.setDate(curTime.getDate() + 30);
document.cookie = `username=yue;expires=${curTime};path=/`