日期:2014-05-16 浏览次数:20537 次
<OBJECT id="ocx文件名/注册表里找来的值" codeBase="ocx控件的相对位置#version=1,0,0,0"data="data:application/xoleobject;base64,mRHW/Ifh3UqI5ZryOEhtERAHAAD/KgAAYSQAAA==" classid="CLSID:通过MCP找到的classid" VIEWASTEXT> </OBJECT>
<object classid="clsid:CA69969C-2F27-41D3-954D-A48B941C3BA7" id="Biokey1" width="0" height="0">其他选项就不写,这样也可以。
<script language="javascript" for="Biokey1" event="OnFeatureInfo(AQuality)" type="text/javascript"> if(AQuality != 0){ alert("不合格,请重来!"); } //该事件要做的事情都写在这里就可以了。。。。。。 </script> 解释:event="OnFeatureInfo(AQuality)" 是ocx中的事件 <OBJECT ID= "test " WIDTH=0 HEIGHT=0 CLASSID= "CLSID:226BEB85-AFA6-4B1A-9B5B-48673A55BB85 " CODEBASE= "http://localhost/activex/a.ocx "> <PARAM NAME= "_ExtentX " VALUE= "0 "> <PARAM NAME= "_ExtentY " VALUE= "0 "> </OBJECT> //CODEBASE= "http://localhost/activex/a.ocx " 這個不應該這樣寫,要寫成 CODEBASE= "../activex/a.ocx#version1.0.0.1 "