📜  cookie 未立即清除 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:30.342000             🧑  作者: Mango

代码示例1
var deleteCookie = function(name) {
    document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;domain=.mydomain.com;';
    document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;domain=sub.mydomain.com;';
};