js实现cookie的存取值
1.js存入cookiefunction setCookie (name, value){ //name相当于key,value为转入的值 var expdate = new Date(); //初始化时间 expdate.setTime(expdate.getTime() + 30 * 60 * 1000); //时间单位毫秒 document.cookie = name+"="+value+";expires="+ex