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