function setCookie(name,value,expires,path,domain){ //设置过期时间 var oDate = new Date(); oDate.setDate(oDate.getDate()+expires); var str = name +'='+encodeURIComponent(value)+';expires'+oDate; //指定路径 path = path ||'/'; str+= ';path=' + path; //设置域名if(dom…