!DOCTYPE html>

Welcome to GeeksforGeeks

This is the example of location.href way.