一.设置cookie function setCookie(name, value){ Days = 1; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); var domain = window.location.host; var domains = domain.split('.'); if (domains.length === 3){ domains = domains.slice(1,3);
//在main.js设置全局的请求次数,请求的间隙 axios.defaults.retry = 4; axios.defaults.retryDelay = 1000; axios.interceptors.response.use(undefined, function axiosRetryInterceptor(err) { var config = err.config; // If config does not exist or the retry option is not set
转自http://yaoqianglilan.blog.163.com/blog/static/70978316201091810435251/ 本人亲测setcookie() getcookie()非常好用,其它待测试 1.js设置cookie //set cookie function setcookie(name,value){ var Days = 30; var exp = new Date(); exp.setTime(exp.g
JS设置cookie,删除cookie(引) js设置cookie有很多种方法. 第一种:(这个是w3c官网的代码) <script> //设置cookie function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); docum