平台介绍 >> js/jsfun/fnCookie.js COOKIE操作
js/jsfun/fnCookie.js COOKIE操作
//COOKIE,设置后,只能在下次请求生效,当前请求不会改变值
let key = "cookie_key"
console.log("COOKIE_0:", fnCookie_get(key))
//设置cookie,5秒后失效
fnCookie_set(key,fnTime_timestamp(),5)
console.log("COOKIE_1:", fnCookie_get(key))
//设置cookie,50秒后失效
fnCookie_set(key,fnTime_timestamp(),fnTime_timestamp()+50)
console.log("COOKIE:", fnCookie_get(key))
//取得全部的cookie
console.log("all_COOKIE:", fnCookie_getAll())
//删除cookie
fnCookie_remove(key)