• js 获取cookie


      <!DOCTYPE html>
      <html xmlns="http://www.w3.org/1999/xhtml">
       
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <meta http-equiv="pragma" content="no-cache" />
       
      <meta http-equiv="Cache-Control" content="no-cache" />
       
      <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" />
      <title></title>
      <script type="text/javascript">
      function getCookie(c_name) {
      if (document.cookie.length > 0) {
      c_start = document.cookie.indexOf(c_name + "=")
      if (c_start != -1) {
      c_start = c_start + c_name.length + 1
      c_end = document.cookie.indexOf(";", c_start)
      if (c_end == -1) c_end = document.cookie.length
      document.getElementById("span_id").innerHTML =unescape(document.cookie.substring(c_start, c_end))
      }
      }
       
      }
      </script>
      </head>
      <body onload="getCookie('_Yeds1216_')" style="color:green">
      cookie: <span id="span_id"></span>
      </body>
      </html>
       
  • 相关阅读:
    [编程题]多多的数字组合
    mac传输文件到服务器
    git 清除缓存、查看add内容
    go build
    vim编辑器
    Git: clone指定分支
    查看端口占用以及kill
    curl小记录
    Python3.9 malloc error: can’t allocate region
    设计模式-策略模式
  • 原文地址:https://www.cnblogs.com/lyl6796910/p/3771378.html
Copyright © 2020-2023  润新知