Dowemo
0 0 0 0

jQuery:

$.cookie('cookieName', 'cookieValue') //存入值$.cookie("cookieName")//取出值

JS:

document.cookie ="cookieName="+=cookieValeu;
var cookie_value = getCookie(cookie_name);

Java:

复制代码
//获取cookieCookie []cookies=request.getCookies();
String cookieName="myCookie";if(cookies!= null){
 for(Cookie cookie : cookies) {
 if(cookie.getName().equals(cookieName)) {
 return cookie.getValue();
 }
 }
}//存储String cookieName="myCookie";
String cookieValue="cookieValue";
Cookie myCookie=new Cookie(cookiename,(Object)cookieValue);
myCookie.setmaxAge(60*60*24);//一天respose.addCookie(myCookie); 
复制代码



Copyright © 2011 Dowemo All rights reserved.    Creative Commons   AboutUs