title: How can I change the value of a querystring with mooTools?
body: <p>Given a string containing an absolute URL with a querystring parameter, what is the easiest way to replace the value of the parameter using JavaScript and/or MooTools?</p>
  
  <p>e.g.</p>
  
  <pre><code>// Change this
  '/foo/bar?frob=123456789'
  
  // Into this
  '/foo/bar?frob=abcdefg'
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>The URL is not the <code>location</code> of the current window. It is a variable containing a string. I just want to manipulate this string.</p>