function cc6_readCookie(name){
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0){
    offset = document.cookie.indexOf(search);
    if (offset != -1){
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

 

 

function cc6_writeCookie(name, value, hours){
  var expire = "";
  if(hours != null){
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}

注:来自于

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-08-19
  • 2022-01-16
  • 2022-12-23
  • 2021-12-16
  • 2022-02-02
猜你喜欢
  • 2022-02-21
  • 2021-06-23
  • 2021-07-17
  • 2021-10-31
  • 2021-12-19
  • 2021-09-22
  • 2021-09-24
相关资源
相似解决方案