<script>
var oXmlDoc= new ActiveXObject("Microsoft.XMLDOM");
oXmlDoc.loadXML("<root><child>A</child><child>B</child><child text='C'></child></root>");
oXmlDoc.createProcessingInstruction("xml", "version=\"1.0\"")
oRoot=oXmlDoc.documentElement;
alert(oRoot.selectNodes("child[@text='C']").length);//期望是1,怎么实现?
</script>
var oXmlDoc= new ActiveXObject("Microsoft.XMLDOM");
oXmlDoc.loadXML("<root><child>A</child><child>B</child><child text='C'></child></root>");
oXmlDoc.createProcessingInstruction("xml", "version=\"1.0\"")
oRoot=oXmlDoc.documentElement;
alert(oRoot.selectNodes("child[@text='C']").length);//期望是1,怎么实现?
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货