📌  相关文章
📜  后退按钮刷新页面单击javascript代码示例

📅  最后修改于: 2022-03-11 15:01:05.579000             🧑  作者: Mango

代码示例1
window.addEventListener( "pageshow", function ( event ) {
  var historyTraversal = event.persisted || ( typeof window.performance != "undefined" && window.performance.navigation.type === 2 );
  if ( historyTraversal ) {
    // Handle page restore.
    //alert('refresh');
    window.location.reload();
  }
});