标签: javascript cookies slim-lang
我当前正在尝试通过单击按钮来删除Cookie。我有一个delete-cookie.slm,如下所示:
delete-cookie.slm
input type="button" value ="delete cookie" onclick= 'document.cookie = "site-alert-slug=; expires=Thu, 01 Jan 2000 00:00:00 GMT";'
但是,这没有用。刷新页面时,运行document.cookie时仍会看到cookie。会是什么?
document.cookie