js go to url code example
Example 1: jquery get current url
var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript
Example 2: javascript got to url
window.location.href = "https://www.google.com"
Example 3: javascript go to url
window.location = url;
Example 4: js go to page
window.location.href = "http://example.com/new_url";