$.mobile.path object provides properties and methods that you can use to work with URLs. This recipe shows you how to fetch the components of a URL using the
Copy the full code of this recipe from the
code/09/parseurl source folder. You can launch this code by using the URL:
main.htmlwith an empty
divtag and an anchor link, as shown in the following code snippet:
<div data-role="content"> <div id="msgdiv"></div> <a href="http://user:pwd@localhost:8080/09/main.html?img=img1.png#imgview" data-role="button">Link 1</a> </div>
<head>section to fetch the URL of the anchor button when it is ...