How to check page is reloading or refreshing using jquery or javascript?

前端 未结 4 1032
说谎
说谎 2020-12-06 00:43

I have to do some kind of operation on the page refresh or reload. that is when I hit next page or Filter or refresh on the grid. I need to show some confirmation box over t

4条回答
  •  再見小時候
    2020-12-06 01:23

    $(function () {
        if (performance.navigation.type == 1) {
            yourFunction();
        }
    });
    

    More about PerformanceNavigation object returned by performance.navigation

提交回复
热议问题