Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
487 B
1
Indexable
Never
<!DOCTYPE html> 
<html> 

<head> 
	<title>Handling the Backward & Forward Buttons</title> 
</head> 

<body> 
	<div> 
		<h1>GeeksforGeeks</h1> 
		<h3>Forward and Back Button in html-2</h3> 
		<button onclick="next()"
				id="forward">Forward 
		</button> 
		<button onClick="previous()"
				id="backward">Back 
		</button> 
	</div> 
	<script> 
		function next() { 
			window.history.forward(); 
		} 
	
		function previous() { 
			window.history.back(); 
		} 
	</script> 
</body> 
</html>