Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Javascript中的XML数据获取任何属性的值_Javascript_Html_Jquery_Xml - Fatal编程技术网

从Javascript中的XML数据获取任何属性的值

从Javascript中的XML数据获取任何属性的值,javascript,html,jquery,xml,Javascript,Html,Jquery,Xml,但我有一个例外: $(…).getAttributeValue不是函数读取属性的jquery方法是.attr,可应用于xml: $(xmlresponse).getAttributeValue('status'); var xml='' +'' +'' +'' console.log($(xml.attr(“status”)) 实际上,getAttributeValue()不是jQuery方法。你在哪里找到的? $(xmlresponse).getAttributeValue('status

但我有一个例外:
$(…).getAttributeValue不是函数

读取属性的jquery方法是
.attr
,可应用于xml:

$(xmlresponse).getAttributeValue('status');
var xml=''
+''
+''
+''
console.log($(xml.attr(“status”))

实际上,
getAttributeValue()
不是jQuery方法。你在哪里找到的?
$(xmlresponse).getAttributeValue('status');
$(xml).attr("status")