history

書式

history.プロパティ
history.メソッド

説明

ヒストリー(履歴)オブジェクトです。ページ上に表示されたURLを保持しています。以下のサンプルはSafari 2では何も表示されません。

サンプルコード [実行]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<script type="text/javascript"><!--
window.onload = function() {
var txt = "";
for (i in history) {
try {
txt += i+" = "+history[i]+"<br>";
}catch(e){}
}
document.getElementById("result").innerHTML = txt;
}
// --></script>
</head>
<body>
<div id="result"></div>
</body>
</html>