How can I read get parameters passed to a JS file like so:
<script type="text/javascript" src="/script.js?p1=hello&p2=world"></script>
In the same file (script.js) I want to read the p1 and p2 values like:
var p1 = params["p1"];
I'd rather avoid a method that getElementById's or uses the dom anyway. thanks.