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