How do you extract the parameters from a URL with JavaScript. For example I have a list of urls such as http://domain/musicapp/player.html?id=1 and http://domain/musicapp/player.html?id=2. How can I ensure that when I click one of the links that I pull the value of the id using JavaScript.