📜  清除所有 Cookie - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:00.336000             🧑  作者: Mango

代码示例1
const clearCookies = document.cookie.split(';').forEach(cookie => document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));