jquery get domain name from url code example Example: jquery get origin url console.log(window.location.origin);