• 查看OCX的属性和方法的脚本


     /----查看OCX组件的属性
    <html>
    <head>
    <title>OCX</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    var flag=true
    function showall(){
     alist = new Array();
     newocx();
     list1.value = "";
     list2.value = "";
     list1.value = ocxtype.outerHTML;
     j = 0;
     for (i in ocxtype)
     {
      alist[j] = i;
      j++;
     }
     for (i = 0; i < alist.length; i++)
      for (j = (alist.length-1); j > 0; j--)
      {
       if (alist[j] < alist[j-1])
       {
        temps = alist[j];
        alist[j] = alist[j-1];
        alist[j-1] = temps;    
       }
      }
     for (i = 0; i < alist.length; i++)
      list2.value +=  alist[i] + "\n";
     alert("共有 "+alist.length+" 个属性方法")
    }
    function newocx()
    {
     ocxfield.innerHTML = "<OBJECT ID='ocxtype' WIDTH='0px' HEIGHT='0px'" +
         "CLASSID='CLSID:" + ocxid.value + "'></OBJECT>";
    }
    </script>
    </head>

    <body bgcolor="#FFFFFF" text="#000000">

    <div align="center">
      <p>classid
        <input type="text" id="ocxid" style="400" value="F3A614DC-ABE0-11d2-A441-00C04F795683" onchange="jscript:flag=true">
        <input type="button" id="look" value="查看" onclick="showall()">
      </p>
      <table width="75%" border="1">
        <tr>
          <td height="24">
            <div align="center">html中的写法</div>
          </td>
          <td height="24">
            <div align="center">OCX中的属性事件</div>
          </td>
        </tr>
        <tr>
          <td>
            <textarea id="list1" style=" 500px; height: 400px;" readonly></textarea>
          </td>
          <td>
            <textarea id="list2" style="250px; height:400px;" readonly></textarea>
          </td>
        </tr>
      </table>
    </div>
    <div id="ocxfield">
    </div>
    </body>
    </html>

  • 相关阅读:
    VirtualBox中的Linux读取Windows共享目录
    Windows10资源管理器去掉左侧“下载、文档、图片、音乐、视频”等目录
    在Eclipse ee中成功使用jQuery UI插件
    (medium)LeetCode .Implement Trie (Prefix Tree)
    (*medium)LeetCode 211.Add and Search Word
    (easy)LeetCode 257.Binary Tree Paths
    2016 360笔试 编程题 2
    2016 360笔试 编程题1
    (番外)使用DFS和BFS实现拓扑排序
    (medium)LeetCode 210.Course Schedule II
  • 原文地址:https://www.cnblogs.com/MyFavorite/p/268592.html
Copyright © 2020-2023  润新知