javascript open url
snippet in javascript

javascript open url

user4056

window.location.href = "http://example.com/";

window.open in js

user2257


window.open("https://www.w3schools.com"); 

javascript open new window

user6808

<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
Open New Window
</a>

jquery get origin url

user4540

console.log(window.location.origin);