function log() { //清空缓存 window.localStorage.clear(); window.location.href="login.html"; } 转载于:https://www.cnblogs.com/deng-jie/p/9104272.html