how to add text in base url using jquery code example Example: js get base url var url = window.location.origin;