Javascript examples for Browser Object Model:History
The length property returns the number of URLs in the history.
The property returns at least 1 for the currently loaded page.
This property is read-only.
A Number, representing the number of entries in the session history
The following code shows how to get the number of URLs in the history list:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var x = history.length;/*from w w w. j a v a2s . co m*/ document.getElementById("demo").innerHTML = x; </script> </body> </html>