is it possible to get the parameters passed along with the js file url to fetch from the script of that js file itself?
That's an interesting question. My immediate reaction says no.
I figured out a way to do this. var script = document.getelementbytagname ("script"); var a = script[0].src.split("?").pop().split("&"); var object = {}; for (var j = 0; j<a.length; j++) { var keyValue = a[j].split("="); Object [keyValue[0]] = keyValue [1]; }
Обсуждают сегодня