JavaScript BOM History Object

BOM - History Object :

history :

We have already talked about the browser object 'window' that gives us access to complete window on which the web page is rendered.

If required, BOM also gives us a specific object to target only one of the window properties. For example, if we are only concerned about the list of URLs that have been visited by the user and we do not need any other information about the browser, BOM gives us the 'history' object for this. It provides programmatic navigation to one of the URLs previously visited by the user. Following are the properties or methods that help us do it

JS BOM history property
CODE/PROGRAM/EXAMPLE
<html>
	<head>
		<style>
			body {
				padding-top: 10px;
			}
		</style>
	</head>
	<body class="container-fluid">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3>History</h3>
			</div>
			<div class="panel-body">
                <input
                  type="button"
                  value="<< Previous"
                  class="btn btn-warning"
                  onclick="history.back()"
                />
                <input
                  type="button"
                  value="Next >>"
                  class="btn btn-success"
                  onclick="history.next()"
                />
            </div>
		</div>
	</body>
</html>
#history_object_in_javascript #History_Object_javascript #history_object_in_javascript_example #History_Object_javascript_example

(New page will open, for Comment)

Not yet commented...