这是我正在尝试的代码
我唯一的问题是为什么我的代码没有在 projectAreaContextId 中分配 y 的值?
编辑1:我已经更正了一些内容
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
var random =widgetLink+"/ccm/rpt/repository/workitem?fields=workitem /projectArea/*";
xhttp.open("GET", random , true);
xhttp.send();
function myFunction(xml) {
myHashMap = {};
var xmlDoc = xml.responseXML;
x = xmlDoc.getElementsByTagName('contextId');
a = xmlDoc.getElementsByTagName('name');
for(i=0;i<a.length;i++)
{
y = x[i].childNodes[0].nodeValue;
if((a[i].childNodes[0].nodeValue)===(actualPA)){
console.log("uuid for pa"+y);
}
}
}
if (parentLink.includes(templink)) {
projectAreaContextId = y.toString();
console.log(projectAreaContextId);
}
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)