winodw.history 프로퍼티는 History 객체에 대한 참조이며, 윈도우의 열람 이력을 최근에 방문한 URL의 배열로 나타낸다.
window.history 객체는 다음과 같은 메서드를 제공한다.
window.history 객체를 사용하는 예제는 다음과 같다.
<!DOCTYPE html>
<html>
<head>
<title>JavaScript History</title>
</head>
<body>
<script type="text/javascript">
function goBack()
{
history.back()
}
function goForward()
{
history.forward()
}
</script>
<input type="button" value="Back" onclick="goBack()">
<input type="button" value="Forward" onclick="goForward()">
</body>
</html>
| ← 이전 | 홈 | 다음 → |