//创建cookie CloudShareCommon.prototype.setCookie = function (name, expireday) { var exp = new Date(); exp.setTime(exp.getTime() + expireday * 60 * 1000); //设置cookie的期限 document.cookie = name + "=true" + "; expires" + "=" + exp.toGMTString(); //创建cookie }