📜  javascript cookie 存储对象 - Javascript 代码示例

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

代码示例1
function bake_cookie(name, value) {
  var cookie = [name, '=', JSON.stringify(value), '; domain=.', window.location.host.toString(), '; path=/;'].join('');
  document.cookie = cookie;
}