get current url js
snippet in javascript

get current url js

user1483

var currentUrl = window.location.href;

get url javascript

user2615


 document.getElementById("demo").innerHTML =
"Page location is " + window.location.href;

 

javascript get domain

user970

window.location.hostname