简体   繁体   English

在html中使用ActiveX与javascript

[英]Using ActiveX in html with javascript

i am trying to embed ActiveX into html, and to call the function from javascript 我试图将ActiveX嵌入到HTML中,并从javascript调用该函数

<html>
<head>
    <TITLE>NVPlayer</TITLE> 
</head>
<body>
<div>
    <OBJECT   
        ID="NVPLayerCompX"  
        NAME="NVPLayerCompX"
        CLASSID="clsid:320F09DC-6C26-4C18-BCA1-54030E7145B7"  
        CODEBASE="NVPlayerCompX.dll"  
        WIDTH="300"  
        HEIGHT="300">  
    </OBJECT>       
</div>
<div>
    <button type="button" onclick="javascript:launch()">Click me!</button>
</div>

    <script type="text/javascript">
        function launch()
        {
             var myObject = document.getElementById("NVPLayerCompX").object

        }
    </script>
</body>

i am getting null in myObject, do i need to use ActiveXObject? 我在myObject中得到null,我需要使用ActiveXObject吗? i am new with this issues, what is the meaning of the name property in the object element 我是这个问题的新手,对象元素中name属性的含义是什么

what am i missing? 我错过了什么?

var myObject = document.getElementById("NVPLayerCompX")

那是你的对象

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用JavaScript的ActiveX DLL - ActiveX DLL using javascript Javascript - 有没有办法使用ActiveX将HTML格式导出到word文档? - Javascript - Is there a way to export HTML along with formatting to a word document using ActiveX? 使用ActiveX调用XRM Javascript调用Web服务的替代方法 - Alternative to XRM Javascript calling webservice using ActiveX 可以使用javascript将ActiveX控件附加到页面? - Possible to append a ActiveX control to a page using javascript? 如何在使用JavaScript的情况下启用ActiveX控件 - How to enable activex controls in ie using javascript 无法使用 javascript 创建 ActiveX object - unable to create ActiveX object using javascript 处理HTML / Javascript中ActiveX控件的属性触发的事件 - Handling events fired by Property of ActiveX Control in HTML/Javascript ActiveX远程桌面连接HTML对象无法使用javascript正确显示 - ActiveX Remote Desktop Connection HTML object not displaying correctly with javascript html到exe&gt;阻止Internet Explorer对象中的javascript和Activex安全提示 - html to exe> prevent javascript and activex security prompt in internet explorer object 在不使用ActiveX的情况下,使用javascript创建/编写文本/ xml文件 - Creating/Writing a text/xml file using javascript without using ActiveX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM