基础
设置
var data = new Date();
data.setDate(data.getDate() + 7);
document.cookie = "user=blue;expires=" + data;
document.cookie = "password=123";
获取cookie
co = document.cookie;
//'user=blue; password=123'
//分割各个值
aCo = co.splite("; ");
删除cookie
var data = new Date();
data.setDate(data.getDate() - 1);
document.cookie = "user=blue;expires=" + data;