事件参数 JavaScript
我有以下疑问:
我正在从 html 标签操作 activex 对象:
;
该对象返回我从以下标签获得的一些事件:
<script language="javascript" for="sdo_prr" event="AtPrintRawEnd">
<!--
I can put some line code in here.
//-->
</script>
为了理解上面的标签,我将解释你的属性:
当我放置属性 for="sdo_prr"
时,我想说这个脚本与我的主题直接相关。
当我放置属性event
时,我想说这个脚本正在等待该对象的事件,即当有问题的对象触发此事件时将执行该脚本AtPrintRawEnd
。
现在是我的问题: 这个事件有一个参数,我需要在其中获取它,就像我从 C# 中的事件获取参数一样,例如:EventArgs e
。
I have the follow doubt:
I'm manipuling an activex object from html tag :
<object classid="clsid:3751B5D4-D348-11D0-AD02-0060970C3D2F" id="sdo_prr" name="sdo_prr" width="0" height="0"></object>
;
And that object return me some events that I get from the following tags:
<script language="javascript" for="sdo_prr" event="AtPrintRawEnd">
<!--
I can put some line code in here.
//-->
</script>
To understand the tag above I will explain yours attributes:
When I put the attribute for="sdo_prr"
, I want to say that this script is connected directly to my subject matter.
When I put the attribute event
, I want to say that this script is waiting for the event for the object, i.e., this script will be executed when the object in question to fire this event AtPrintRawEnd
.
Now is my question:
This event he has an argument in which I need to get it, just as I get an argument from an event in C# for example: EventArgs e
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以这种方式定义您的事件:
我不确定它是否有效,但我很确定没有办法使用其他模式获取参数。
Try defining your event this way instead:
I'm not sure that it will work, but I am pretty sure there is no way to get at the arguments with the other pattern.
人们感谢所有评论...
我通过以下方式找到了解决方案:
我传递参数设置事件标记内的事件中命名的事件;;
People thanks for all comments...
I found the solution by the follow way:
I pass the argument set the event named in the event within the event tag;;