var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.async = false;
xmlDoc.load("books.xml");
var node = xmlDoc.selectSingleNode("/feature/region/style");
alert(node.xml);
xmlDoc.async = false;
xmlDoc.load("books.xml");
var node = xmlDoc.selectSingleNode("/feature/region/style");
alert(node.xml);
解决方案 »
- frameset页面跳转问题
- 求职拖动层的坐标值如何赋给表单?
- 如何设定鼠标在控件上停2秒就显示信息
- 小妹再次麻烦大家!!!!!!!!!!!
- 请问谁有JavaScript写的五子棋源码?收到立即给分
- 一个简单问题,如何求一个div的相对于浏览器的top
- 这个怎么实现啊?日期的问题!
- 关于文本域内的输入文字及时计算问题
- 能不能计算出表格中有几行是显示的,几行是隐藏的??????
- 我在要客户端验证用户输入是不是一个时间的函数怎么写?象(10:23:12)
- 怎么在两个框架里面同时出现网页?
- 打印时,怎么样用js设置纸张大小,打印完毕重设回默认纸张(俺在csdn上搜索好多贴,都不尽人意,希望高手你出手,不要乱贴一些没有用的代
<feature xmlns:v="urn:schemas-microsoft-com:vml">
<region>
<style id="R01">
<v:fill on="true" color="#ffff00" opacity="30%" />
</style>
</region>
</feature>
</xml>
<script>
var node=xml1.selectSingleNode("//style[@id='R01']/v:fill")
alert(node.xml)</script>
这个books.xml是那里来得???
<feature xmlns:v="urn:schemas-microsoft-com:vml">
<region>
<style id="R01">
<v:fill on="true" color="#ffff00" opacity="30%" />
</style>
</region>
</feature>
</xml>
<script>
var node=xml1.selectSingleNode("//style[@id='R01']/v:fill")
alert(node.xml)</script>
这个不行啊
<xml>
<feature xmlns:v="urn:schemas-microsoft-com:vml">
<region>
<style id="R01">
<v:fill on="true" color="#ffff00" opacity="30%" />
</style>
</region>
</feature>
</xml>
<script>
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.loadXML(document.getElementsByTagName('xml')[0].innerHTML);
alert(xmlDoc.selectSingleNode('/feature/region/style').xml);
</script>
</body>