<script>
function additem(){
var xmldom = new ActiveXObject("Microsoft.XMLDOM");
xmldom.async = false;
xmldom.load("youxmlfile.xml");
var xnode = xmldom.documentElement.createElement("Item");
xnode.text = "abc";
var newAtt = xnode.createAttribute("ID");
newAtt.text = "A";
xmldom.documentElement.appendChild(xnode);
alert(xmldom.xml);
}
</script>
function additem(){
var xmldom = new ActiveXObject("Microsoft.XMLDOM");
xmldom.async = false;
xmldom.load("youxmlfile.xml");
var xnode = xmldom.documentElement.createElement("Item");
xnode.text = "abc";
var newAtt = xnode.createAttribute("ID");
newAtt.text = "A";
xmldom.documentElement.appendChild(xnode);
alert(xmldom.xml);
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货