up to var and url to make complete url in html code example Example: javascript get url path window.location.pathname