jQuery how to get the base url code example Example: jquery get base url console.log(window.location.origin);