How to determine parameters from <script>?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4716612/how-do-i-get-query-string-value-from-script-path">How do I get query string value from script path?</a>  </p>
</blockquote>



<p>I have:</p>

<p>index.html:</p>

<pre><code>...
&lt;script src="myscript.js?param1=1&amp;param2=2"&gt;
...
</code></pre>

<p>myscript.js:</p>

<pre><code>function getScriptParam(paramName){
  // How to determine the script parameters value?
  var value = HOW TO DO?;

  return value;
}

var param1 = getScriptParam('param1');  // param1 should be '1'
</code></pre>

<p>Thanks.</p>
