前端获取Cookie方法

  • Post author:
  • Post category:其他




<%

Cookie[] cookies = request.getCookies();



if (cookies != null) {



Cookie cookie;



for (int i = 0; i < cookies.length; i++) {



cookie = cookies[i];



cookie.getName();



cookie.getValue();



System.out.print(cookie.getName()+”—-“+cookie.getValue());



}



}

%>



版权声明:本文为yulei2008_原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。