首次加载是name为空或其他,这是给设定个isReload。
刷新页面这时候name ,为isReload
handleIsRefresh() {
if(window.name == “”){
console.log(“首次被加载”);
window.name = “isReload”;
}else if(window.name == “isReload”){
console.log(“页面被刷新”);
}
},
WEB前端判断页面是首次加载还是刷新
最新推荐文章于 2023-11-15 10:30:35 发布