HISTORY OBJECT ALONG WITH ITS PROPERTIES AND METHODS
HISTORY OBJECT ALONG WITH ITS PROPERTIES AND METHODS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HISTORY OBJECT</title>
</head>
<body>
<h1>HISTORY OBJECT</h1>
<button onclick="func1()">GO BACK</button>
<button onclick="func2()">GO FORWARD</button>
<button onclick="func3()">2 PAGES BACK</button>
<script>
function func1(){
history.back();
}
function func2(){
history.forward();
}
function func3(){
history.go(-2);
}
console.log(history.length);
</script>
</body>
</html>
Comments
Post a Comment
I WOULD APPRECIATE IF YOU LEAVE A COMMENT OR YOUR FEEDBACK HERE !!!