神剑山庄资源网 Design By www.hcban.com

复制代码代码如下:
<HTML>
<HEAD>
<TITLE>Test ActiveX</TITLE>
<OBJECT ID="TestCtrl" NAME="<span style="font-family:Arial,Helvetica,sans-serif">TestCtrl</span><span style="font-family:Arial,Helvetica,sans-serif">"</span>
CODEBASE="calc.CAB#version=1,0,0,1"
CLASSID="clsid:CDF1D789-F8A3-48F2-B0DE-0D72F2D89F76">
<PARAM NAME="downpath" VALUE="123456" />
</OBJECT>
<script language="javascript">
function doTest()
{
alert(<span style="font-family:Arial,Helvetica,sans-serif">TestCtrl</span><span style="font-family:Arial,Helvetica,sans-serif">.</span><span style="font-family:Arial,Helvetica,sans-serif">downpath</span><span style="font-family:Arial,Helvetica,sans-serif">);</span>
}
</script>
</HEAD>
<BODY>
<input type="button" value="Get left time" id="btnOK" onclick="doTest();"></input>
</BODY>
</HTML>

如果创建的属性类型是BSTR,变量名是downpath,要添加如下代码:

创建属性时选择member variable方式,然后在下面代码中添加如下代码

复制代码代码如下:
void COCXTestCtrl::DoPropExchange(CPropExchange* pPX)
{
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
COleControl::DoPropExchange(pPX);
// TODO: Call PX_ functions for each persistent custom property.
PX_String(pPX, _T("downpath"), m_downpath, _T(""));
}
标签:
param,name,ActiveX控件

神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网 免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com

评论“网页中通过param name方式给ActiveX控件的属性赋值示例”

暂无网页中通过param name方式给ActiveX控件的属性赋值示例的评论...