为什么我无法在tag=IMIE
中从nameTextField.text
到QML
获得价值?
Error: TypeError: Property 'getElementsByTagName' of object [object Object] is not a function
我的功能
function load()
{
var xmlDoc;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
//console.log('HEADERS_RECEIVED')
} else if(xhr.readyState === XMLHttpRequest.DONE) {
xmlDoc=xhr.responseXML;
//error
nameTextField.text = xmlDoc.getElementsByTagName("IMIE")[0].childNodes[0].nodeValue; // <- error: TypeError: Property 'getElementsByTagName' of object [object Object] is not a function
//error
}
}
//xhr.open("GET", "");
//xhr.send();
}
我在报告的bug中找到了这个,但是我如何解决这个问题呢?