可以修改,我对JS并不是非常熟悉,给你一段代码参考一下。
xmldom.async = false;
xmldom = document.all.mxh.XMLDocument}function test2(){var xmldom = new ActiveXObject("Msxml2.DOMDocument")
xmldom.async = false;
xmldom = document.all.mxh.XMLDocument
node = xmldom.selectSingleNode("//nodeB")
node2 = xmldom.createElement("nodeB")
node2.text=parseInt(node.text)+1
xmldom.documentElement.replaceChild(node2,node)
node = xmldom.selectSingleNode("//nodeB")
alert(node.text)
alert(xmldom.xml)}function test3(){document.f.xmldata.value= document.all.mxh.XMLDocument.xml
alert(document.f.xmldata.value)
document.f.submit()}