我在网页中有如
<script language="javascript">
var xml =new ActiveXObject("Microsoft.XMLDOM");
xml.load("a.xml");
alert(xml.documentElement);
</script>
在网站中的dd.htm文件夹中已加入a.xml
为什么C:\Inetpub\wwwroot\LinSoft\javas\dd.htm 中xml.documentElement 为object
而 http://localhost/LinSoft/javas/dd.htm 中却是null呢
<script language="javascript">
var xml =new ActiveXObject("Microsoft.XMLDOM");
xml.load("a.xml");
alert(xml.documentElement);
</script>
在网站中的dd.htm文件夹中已加入a.xml
为什么C:\Inetpub\wwwroot\LinSoft\javas\dd.htm 中xml.documentElement 为object
而 http://localhost/LinSoft/javas/dd.htm 中却是null呢
你的虚拟路径的对应物理路径不在默认的C:\Inetpub\wwwroot下8,路径设置错误了。