📅  最后修改于: 2022-03-11 15:04:10.743000             🧑  作者: Mango
document.cookie = "hacker=anthony; SameSite=None; Secure";
function checkACookieExists() {
if (document.cookie.split(';').some((item) => item.trim().startsWith('hacker='))) {
const output = document.getElementById('a-cookie-existence')
output.textContent = '> The cookie "hacker" exists'
}
}
function clearOutputACookieExists() {
const output = document.getElementById('a-cookie-existence')
output.textContent = ''
}