title: JavaScript - how to retrieve the src="" url from the script contents?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/647259/javascript-query-string">JavaScript query string</a>  </p>
  </blockquote>
  
  
  
  <p>I'd like to access query variables attached to my script url. So for example:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://mysite.com/app.js?var1=value1&amp;var2=value2"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>In app.js, how do I access the var1 and var2 values?</p>