Similar to this question, I would like to get the GET request parameter, but in the script tag itself.
My script tag in HTML <head>
is:
<script src="js/script.js?lang=en"></script>
How can I get the lang
value ?
jQuery is used and I can obtain the src
by:
$('script[src$="/script.js"]').attr('src');