gpt4 book ai didi

javascript - 在 html 和 javascript 中使用 ActiveX

转载 作者:行者123 更新时间:2023-12-02 18:39:24 26 4
gpt4 key购买 nike

我正在尝试将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>

我在 myObject 中得到 null,我需要使用 ActiveXObject 吗?我对这个问题很陌生,对象元素中的 name 属性的含义是什么

我错过了什么?

最佳答案

var myObject = document.getElementById("NVPLayerCompX")

那是你的对象

关于javascript - 在 html 和 javascript 中使用 ActiveX,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16979154/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com