카테고리1 프로그래밍
카테고리2 JAVASCRIPT
제목 페이지 이동 감지 관련
작성자 고성훈
작성일 2021-09-08
window.onpageshow = function(event) {
if ( event.persisted || (window.performance && window.performance.navigation.type == 2)) { // 뒤로가기 시
alert('뒤로가기 함');
}else if(performance.navigation.type == 1){ // 새로고침
alert('새로고침 함');
}
}
수정 목록