2015-05-14 59 views

回答

0

您可以添加一個處理程序window.onbeforeunload

window.onbeforeunload = function(event){ 
    console.log(event); 
} 

參見:mdn documentation

+0

即使第一次進行頁面渲染,也會調用此函數。 – Megha

+0

我需要找出頁面是否被刷新。 – Megha