日期:2014-05-16 浏览次数:20319 次
<script type="text/javascript">
var XMLdoc;
function loadXML() {
if (window.ActiveXObject)
{
XMLdoc = new ActiveXObject("Microsoft.XMLDOM");
XMLdoc.async = false;
XMLdoc.load("abc.xml");
getmessage();
}
setTimeout("loadXML()", 1000); //呵呵呵,玩玩你
}
function getmessage() {
var s = XMLdoc.getElementsByTagName("name")[0].childNodes[0].nodeValue;
alert(s);
}
</script>
</head>
<body onload="loadXML()">
<?xml version="1.0" encoding="utf-8" ?>
<measure>
<name>0.0</name>
</measure>