I wanna know is this possible I pass get parameters for a javascript file and use them in codes?
I have this in html:
<script type="text/javascript" src="/javafile.js?q=somtext"></script>
know how I use this “q” parameter in my script codes? is this possible?
You can either:
<script>element so far in the DOM and parsedocument.scripts[document.scripts.length - 1].srcNote that if the script element has been added dynamically (i.e. with JS), it might not be the last script in the DOM.