function ClearCookie() {var expires = new Date();expires.setTime(expires.getTime() - 1000); //Subtract one second of the current time is equivalent to expiration immediately (can be added or decreased) document.cookie = "appCode='222'''';path=/;expires=" + expires.toGMTString() + ""; //expires is the setting corresponding to the expiration time. If this value is not set, the cookie is invalid by default when closing the browser document.cookie = "roleID='333''''';path=/;expires=" + expires.toGMTString() + "";document.cookie = "parentMenuID='000'''';path=/;expires=" + expires.toGMTString() + "";document.cookie = "currentMenuName='haha''''';path=/;expires=" + expires.toGMTString() + "";}path=/; means that the location where the cookie is stored is the browser root directory.
The above method causes the four cookies of appCode, roleID, parentMenuID, currentMenuName to be invalid.