我在Java脚本中收到以下错误 [英] i get the following error in java script

查看:74
本文介绍了我在Java脚本中收到以下错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function abc()
{
      var locator = new ActiveXObject("WbemScripting.SWbemLocator");
      var service = locator.ConnectServer(".");
      var properties = service.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration");
      var e = new Enumerator (properties);
      document.write("<table border=1>");
      alert('aaaaaaa');
      dispHeading();
      for (;!e.atEnd();e.moveNext ())
      {
            var p = e.item ();
            document.write("<tr>");
            document.write("<td>" + p.Caption + "</td>");
            document.write("<td>" + p.IPFilterSecurityEnabled + "</td>");
            document.write("<td>" + p.IPPortSecurityEnabled + "</td>");
            document.write("<td>" + p.IPXAddress + "</td>");
            document.write("<td>" + p.IPXEnabled + "</td>");
            document.write("<td>" + p.IPXNetworkNumber + "</td>");
            document.write("<td>" + p.MACAddress + "</td>");
            document.write("<td>" + p.WINSPrimaryServer + "</td>");
            document.write("<td>" + p.WINSSecondaryServer + "</td>");
            document.write("</tr>");
      }
      document.write("</table>");
}

function dispHeading()
{
      document.write("<thead>");
      document.write("<td>Caption</td>");
      document.write("<td>IPFilterSecurityEnabled</td>");
      document.write("<td>IPPortSecurityEnabled</td>");
      document.write("<td>IPXAddress</td>");
      document.write("<td>IPXEnabled</td>");
      document.write("<td>IPXNetworkNumber</td>");
      document.write("<td>MACAddress</td>");
      document.write("<td>WINSPrimaryServer</td>");
      document.write("<td>WINSSecondaryServer</td>");
      document.write("</thead>");
}





自动化服务器无法创建对象是什么问题





automation server cannot create object what is the problem

推荐答案


每当使用此方法ActiveXObject时,都应允许访问activeX.
我愿意做一些这样的事情.

1)信任您的网站
2)在自定义级别启用ActiveX控件和插件.

我希望它能起作用

whenever you use this method ActiveXObject you shoud have a permition to access the activeX.
I offer to do some of these.

1) trust your site
2) on the custom level enable the ActiveX Controls and Plug-ins.

I hope it work


这肯定与ActiveX权限有关.
很多链接
It is for sure related to ActiveX permissions.
Lots of links here[^].
You would surely find a solution in the first few of them.


这篇关于我在Java脚本中收到以下错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆