<html>
<body>
<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
var link = "http://www.utravel.com.hk/mobile-app/news-xml.php?id=3248";
xmlhttp.open("GET",link,false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
var a=xmlhttp.readyState;
document.write(xmlDoc.getElementsByTagName("content")[0].childNodes[0].nodeValue);
为什么我打开它时什么都没显示? 如果我将链接(作为.html文件)下载到我的计算机中,它可以正常工作