zxforben的技术园地

(没有最好,只有更好!)

导航

JavaScript 捕捉ocx事件

<OBJECT name=aaa
classid="clsid:1677F2FC-05FE-4FA3-95B4-E6359B48387E"
codebase="./ocx/ActiveFormProj1.ocx#version=1,0,6,0"
width=350
height=250
align=center
hspace=0
vspace=0
>
<!-- script函数 -->
<script type="text/javascript" Language=Javascript>
function call(AID,AName)
{
alert(AID+AName);
}
</script>
<!--捕获ocx事件,如果name为aaa的ocx控件抛出OnCall(AID,AName)事件,则下面代码来进行捕获 -->
<SCRIPT type="text/javascript" FOR="aaa" EVENT="OnCall(AID,AName)" >
<!-- insert script commands -->
call(AID,AName);
</SCRIPT>

posted on 2010-07-15 15:11  zxforben  阅读(1699)  评论(0编辑  收藏  举报