//Callback function
function callback() {
//alert(xmlhttp.readyState);
//5. Receive response data
// Determine whether the object's status is interaction completed
if (xmlhttp.readyState == 4) {
// Determine whether the http interaction is successful
if (xmlhttp.status == 200 ) {
//Use responseXML to receive the DOM object of the XML data object
var domObj = xmlhttp.responseXML; lt;message>123123123 ageNodes.length > 0 ) {
// Get the text content in the message node Child node
Return The text content of the text node
var responseMessage = textNode.nodeValue;
; 🎜> HTML content in the node
divNode.innerHTML = responseMessage;
} else {
🎜> else {
alert("The XML data format is wrong, the original text content is: " xmlhttp.responseText); > }
}}