<script
>
function getCookie(key
){
let str
= document
.cookie
;
let arr
= str
.split("; ");
for(let i
=0; i
<arr
.length
; i
++){
let item
= arr
[i
].split("=");
if(item
[0] == key
){
return item
[1];
}
}
return ";"
}
function setCookie(key
,value
,day
){
let d
= new Date();
d
.setDate(d
.getDate()+day
);
document
.cookie
= key
+"="+value
+";expires=" + d
;
}
function delCookie(key
){
setCookie(key
," ",-1);
}
</script
>
转载请注明原文地址: https://yun.8miu.com/read-21179.html