How to parse URL Using jQuery
We can simply parse the current URL elements using window.location JavaScript object. Window.location object contains information about the current URL. For example, to find out protocol in the URL, we can simply use. var sProtocol = window.location.protocol; But let’s say you have URL in a string variable or assigned to any DOM element like anchor […]