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

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

代码示例3
document.cookie.split(";")
  .forEach(function(c) { 
      document.cookie = c.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/"); });