August 1999
Intermediate to advanced
1488 pages
72h 53m
English
history.length
The length property of the History object is used to get the number of URLs in the history list.
Listing 7.298 shows an example of how the length property is used to determine how many URLs are in the history list.
<html>
<head>
<title> Using the length property of the History object</title>
</head>
<body>
<script language="JavaScript">
<!-- Hide
//write the number of elements in the history list
var numOfURL = window.history.length;
document.write("The number of URL's in the history list is: " + numOfURL);
// End Hide
</script>
</body>
</html>
|
Read now
Unlock full access