标签:spl decode 获取 index dex str params address turn
function GetParams(urlAddress) {
var i, strLength, str, keyName, keyValue,
params = {},
url = document.getElementById('sf_debug').src;
if (url.indexOf("?") > -1) {
var index = url.indexOf("?");
str = url.substring(index + 1);
str = str.split("&")
strLength = str.length;
for (i = 0; i < strLength; i++) {
var indexEqual = str[i].indexOf('=');
keyName = str[i].substring(0, indexEqual);
keyValue = str[i].substring(indexEqual + 1);
if (keyName == "callback") keyValue = decodeURIComponent(keyValue);
params[keyName] = keyValue;
}
}
return params;
};
var getParams = new GetParams();
标签:spl decode 获取 index dex str params address turn
原文地址:https://www.cnblogs.com/lalalagq/p/10213481.html