I have a html page index.html
. In the head tag
of that page I want to define a script src:
<script src="http://www.example/hrm.js?pId=5"></script>
I want the pId number to be filled in by the parameter I give to my html file.
for example if I open .../index.html?pId=6
, I want in the script tag of that page
<script src="http://www.example/hrm.js?pId=6"></script>
How can I do that? I tried this: Use JS variable to set the src attribute for <script> tag but the problem is that I have multiple script to load ! and nothting work anymore when I put that piece of code.