<html lang="ko">
<head>
<meta charset="UTF-8">
<title>JavaScript BOM History Object</title>
</head>
<body>
<h1>히스토리 목록의 갯수</h1>
<p>아래 버튼을 눌러 새로운 문서를 연 후에 브라우저의 뒤로 가기 버튼을 눌러보세요!</p>
<button onclick="openDocument()">새로운 문서 열기</button>
<p id="text"></p>
<script>
function openDocument() {
location.assign("/javascript/js_bom_history");
}
document.getElementById("text").innerHTML = "현재 브라우저의 히스토리 목록의 갯수는 " + history.length + "개 입니다.";
</script>
</body>
</html>