Example: Suppose the current page url(window.location.href) is http://example.com/page.html The html page source code is...
<html><head></head><body>
<script src="http://example.com/script.js?user=Ankit&ptid=18"></script>
</body></html>
Now I need to use 'src' variables in script.js And the script file script.js should return
var a="Ankit"
var b="18"
Can we use something like echo $_GET like in php?