Here is the code:
<h2>Use of property location.href</h2>
location.href = "http://www.roseindia.net";;
<button onclick="return setLocation();">Go To www.roseindia.net</button>
Output will be displayed as:
On clicking the you will move to www.roseindia.net:
Ask your questions, our development team will try to give answers to your questions.