注意看
xmlhttp.open("Post,""http;//localhost/WebService/acc.asmx/chack",false);应该是
xmlhttp.open("POST","http;//localhost/WebService/acc.asmx/chack",false);
xmlhttp.open("Post,""http;//localhost/WebService/acc.asmx/chack",false);应该是
xmlhttp.open("POST","http;//localhost/WebService/acc.asmx/chack",false);
直接 var getXML = xmlhttp.responseXML 这样是得不到的。我以前也有过此类的问题。按规范来说.responseXML告诉js解析器回来的是一个XML文档。但是你取它里面的子元素怎么也取不到。后来我:
var s = xmlhttp.responseText;再把S重新构造成XML文档。再来取它的子结点。
你可以通过类似下面的方式取得节点数据:xmlhttp.responseXML.getElementsByTagName("item")[0].firstChild.data;