Home > Article > Web Front-end > How to correctly determine whether the username cookie exists using js_javascript skills
Sometimes we need to use cookies to save user names and record login status. How to correctly determine whether the user cookie exists on this machine? You cannot simply use writing like a!=" =getCookie("username3");
c_start=document.cookie.indexOf("username3=");