title: How to get parameters from a url?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/979975/how-to-get-the-value-from-url-parameter">How to get the value from URL Parameter?</a>  </p>
  </blockquote>
  
  
  
  <p>I have this URL: <code>http://example.com/photos/5062d95d-13e8-ceb8-bb35-5891b62a3418/?id=872364876</code></p>
  
  <p>And I have this javascript code:</p>
  
  <pre><code>if (sssssssssss) {
      window.location = "http://example.com/s/1525";
  } else {
      location.replace('http://example.com/id=');
  }
  </code></pre>
  
  <p>I need to fill the <code>id</code> value from the GET parameters in the <code>else</code> section. 
  Any ideas?</p>