在“key”处传递 cookie 名称
_generatePrefix: function()
{
return '__session:' + this._id + ':';
}
_cookieCache: undefined,
function cookie clear(key)
{
document.cookie = this._generatePrefix() + key + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
delete this._cookieCache[key]
}
当您需要清除特定 cookie 时调用此函数
如果你想清除所有 cookie 使用这个
_generatePrefix: function()
{
return '__session:' + this._id + ':';
}
_cookieCache: undefined,
function clearall()
{
for (var i in this._cookieCache) {
document.cookie = this._generatePrefix() + i + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
this._cookieCache = {};
}