From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/history/back/index.html | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 files/ko/web/api/history/back/index.html (limited to 'files/ko/web/api/history/back/index.html') diff --git a/files/ko/web/api/history/back/index.html b/files/ko/web/api/history/back/index.html new file mode 100644 index 0000000000..2b5ee8475a --- /dev/null +++ b/files/ko/web/api/history/back/index.html @@ -0,0 +1,70 @@ +--- +title: History.back() +slug: Web/API/History/back +tags: + - API + - HTML DOM + - History + - History API + - Method + - Reference + - Web +translation_of: Web/API/History/back +--- +
{{APIRef("DOM")}}
+ +

History.back() 메서드는 브라우저가 세션 기록의 바로 뒤 페이지로 이동하도록 지시합니다. {{domxref("History.go", "history.go(-1)")}}와 같습니다. 이전 페이지가 없는 경우 아무것도 하지 않습니다.

+ +

이 메서드는 비동기적입니다. {{event("popstate")}} 이벤트 처리기를 통해 탐색 완료 시점을 알 수 있습니다.

+ +

구문

+ +
history.back()
+ +

예제

+ +

다음 예제는 클릭했을 때 뒤로 가는 버튼을 생성합니다.

+ +

HTML

+ +
<button id="go-back">뒤로 가기!</button>
+ +

JavaScript

+ +
document.getElementById('go-back').addEventListener('click', () => {
+  window.history.back();
+});
+ +

명세

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("HTML WHATWG", "history.html#history", "History.back()")}}{{Spec2("HTML WHATWG")}}No change from {{SpecName("HTML5 W3C")}}.
{{SpecName("HTML5 W3C", "browsers.html#dom-history-back", "History.back()")}}{{Spec2("HTML5 W3C")}}Initial definition.
+ +

브라우저 호환성

+ + + +

{{Compat("api.History.back")}}

+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf