창 기록
창 기록 개체
history 객체 에는 사용자가 방문한 URL(브라우저 창에서)이 포함됩니다 .
history 객체 는 window 객체 의 속성입니다 .
history 객체 는 다음 을 사용하여 액세스합니다.
window.history
또는 그냥 history
:
예
let length = window.history.length;
let length = history.length;
기록 개체 속성
Property | Description |
---|---|
length | Returns the number of URLs (pages) in the history list |
기록 개체 메서드
Method | Description |
---|---|
back() | Loads the previous URL (page) in the history list |
forward() | Loads the next URL (page) in the history list |
go() | Loads a specific URL (page) from the history list |