JS Location Object

 
<!DOCTYPE html>
<html lang="en">
<head>
	<title>JavaScript</title>
</head>
<body>
	<h1>JavaScript : Location Object</h1>
	<button onclick="newFunction()">Click</button>
	<script>
		/* JavaScript Location Object*/

		//location.href = "http://www.yahoobaba.net";

		//function newFunction(){
		//	location.href = "http://www.yahoobaba.net";
		//}

		/* JavaScript Reload Function*/
		/*function newFunction(){
			location.reload();
		}*/


		/* JavaScript Assign Function*/
		/*function newFunction(){
			location.assign("https://www.google.com");
		}*/		


		/* JavaScript Replace Function*/
		function newFunction(){
			location.replace("https://www.google.com");
		}

	</script>
</body>
</html>