接口response结果取值
发布网友
发布时间:2023-07-12 20:45
我来回答
共1个回答
热心网友
时间:2024-12-04 11:29
var num =text.getElementsByTagName("CAR_DATA");for(b=0;b<num.length;b++)
{ if(num[b].getElementsByTagName(ID)[0].text=='1') { var code1 =num[b].getElementsByTagName(CODE)[0].text; var name1=num[b].getElementsByTagName(NAME)[0].text; } if(num[b].getElementsByTagName(ID)[0].text=='2') { var code2 =num[b].getElementsByTagName(CODE)[0].text; var name2=num[b].getElementsByTagName(NAME)[0].text; }}