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];
}
@kbanana94
That's assuming you know which script it is in the DOM
Also there's a better way to parse query params
Обсуждают сегодня