52,797
社区成员
发帖
与我相关
我的任务
分享
txt="<note>";
txt=txt+"<to>George</to>";
txt=txt+"<from>John</from>";
txt=txt+"<heading>Reminder</heading>";
txt=txt+"<body>Don't forget the meeting!</body>";
txt=txt+"</note>";
if (window.DOMParser)
{
parser=new DOMParser();
xmlDoc=parser.parseFromString(txt,"text/xml");
}
else // Internet Explorer
{
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(txt);
}
xmlHttp.open("POST", "demo_dom_http.asp", false);
xmlHttp.setRequestHeader("application/x-www-form-urlencoded; charset=UTF-8" )
xmlHttp.send(xmlDoc);