get domain name javascript
snippet in javascript

javascript get current url

user432

var currentUrl = window.location.href;

get domain name javascript

user3419

window.location.hostname