javascrip get origin code example Example: javascript get origin url console.log(window.location.origin);