Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我希望 JavaScript 代码在我的网站打开时从浏览器中删除 cookie。
问题:我要注册我的网站,如果注册不成功,下次我打开我的网站时,它会自动转到注册页面,如果我删除浏览器上的所有 cookie,它将转到我的网站首页..
任何人都可以帮助解决这个问题...
谢谢……
如何使用 JavaScript 删除所有 cookie?
var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; i++) eraseCookie(cookies[i].split("=")[0]);