How do I read a GET variable from JavaScript/jQuery?
<p>How do I get a particular GET variable in JavaScript or jQuery?</p>

<p>I want to pass it on in ajax script in this sort of way:</p>

<pre><code>$.ajax({
    url: 'foo/bar.php',
    data: { 
       search: $(this).val(),
       page: something //$_GET['page'] only in js
    },
    ...
</code></pre>
