当前位置: 首页 > 工具软件 > jQuery Values > 使用案例 >

jquery ajax xml attribute,jquery - Find xml attribute values with javascript - Stack Overflow

罗均
2023-12-01

How do I get the attribute value of an XML node with Javascript / jQuery?

I'm trying to get the value of the duration attribute on the node, then get the fixedValue.

'

So far I've got:

var currentLoanRates = function() {

var currLoanXml = '',

xmlDoc = $.parseXML( currLoanXml ),

$xml = $( xmlDoc ),

$intRate = $xml.find("interestRate"),

$varIntRate = $intRate.attr("fixedValue");

console.log($intRate);

console.log($varIntRate);

};

The second console.log prints undefined.

 类似资料: