Pass parameters to a Script tag - Get Parameters of Current Script Tag Src
or
Get Parameters of Current Script Tag Src
or
Pass parameters to a Script tag
See an Example Below -
Here is Content of script.js Result on Console :-
Here is Content of script.js Result on Console :-
WqoYv89
About UrlSearchParams :- https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get
About Document.currentScript :- https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript
Comments