Updated on Kisan Patel
location.href = "http://www.csharopcode.org";
If we want to current url of the web page, we can get it using
location.href as we have done in the
In below code snippet, we have redirect the user from current page to another page by set the target url to
location.href property, in this case we have set to http://www.icsharopcode.org that redirects the user from current page to our website.