页面加载前执行函数

window.onpageshow = function(){
var token = gg.core.cookie.getValue("token");
console.log(token);
if(token == ""||token == null){
window.location = 'login.html';
return;
}
};

猜你喜欢

转载自www.cnblogs.com/tuhazi/p/9878255.html