CCrizel
프로그래밍JAVASCRIPT

페이지 이동 감지 관련

작성자
고성훈
등록일
2021-09-08 08:11
window.onpageshow = function(event) { if ( event.persisted || (window.performance && window.performance.navigation.type == 2)) { // 뒤로가기 시 alert('뒤로가기 함'); }else if(performance.navigation.type == 1){ // 새로고침 alert('새로고침 함'); } }