What is the script in javascript equals to $_SERVER['REQUEST_URI'] in php?
<p>I want to pass a URL to another domain through javascript appending iframe, when exit the iframe, the other domain can return the user to previous page on my site. If use php to submit the exit_url, it is </p>

<pre><code>$exit_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "&amp;request=example"";
</code></pre>

<p>I would like to learn how to convert this string to use in javascript. Thanks!</p>
