jquery.cookie.js下載:
http://download.csdn.net/detail/qust_2011/7200145
//保存
var userId= 2889;
var info='age:22,name:april';
$.cookie(userId,info,{path:'/',expires:1});//保存一天到 當前路徑
//獲取
var info= $.cookie(userId);
//刪除
var info= $.cookie(userId);
if(info!=null){
$.cookie(userId,null,{path:'/'});
}