http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/fireevent.asp
Fires a specified event on the object.
<!---->
bFired
=
object.fireEvent(sEvent [,oEventObject])
Parameters
Parameters
sEvent Required. String that specifies the name of the event to fire. oEventObject Optional. Object that specifies the event object from which to obtain event object properties.
Return Value
Boolean. Returns one of the following values:
true Event fired successfully. false Event was cancelled.
Remarks
If the event being fired cannot be cancelled, fireEvent always returns true.
Regardless of their values specified in the event object, the values of the four event properties—cancelBubble, returnValue, srcElement, and type—are automatically initialized to the values shown in the following table.
Event object propertyValue cancelBubble false returnValue true srcElement element on which the event is fired type name of the event that is fired
Example
<!----><html>
<head>
<script>
function fnfireevents()
{
odiv.innertext = " the cursor has moved over me! ";
obutton.fireevent(" onclick ");
}
</script>
</head>
<body>
<h1> using the fireevent method </h1>
by moving the cursor over the div below, the button is clicked.
<p>
<div id="odiv" onmouseover="fnfireevents();">
mouse over this!
</div>
<p>
<button id="obutton" onclick="this.innertext='i have been clicked!'">
button </button>
</body>
</html>
<head>
<script>
function fnfireevents()
{
odiv.innertext = " the cursor has moved over me! ";
obutton.fireevent(" onclick ");
}
</script>
</head>
<body>
<h1> using the fireevent method </h1>
by moving the cursor over the div below, the button is clicked.
<p>
<div id="odiv" onmouseover="fnfireevents();">
mouse over this!
</div>
<p>
<button id="obutton" onclick="this.innertext='i have been clicked!'">
button </button>
</body>
</html>
相关推荐
fireEvent("Before " + method.getName()); // 调用目标方法 Object result = method.invoke(target, args); // 触发事件 fireEvent("After " + method.getName()); return result; } private void fire...
事件群 一个事件处理程序,具有事件侦听和触发,事件群集在任何地方,以及多个事件组可以协同工作的功能。...// To call onto event listeners use the `.fire` method. MyHandler . fire ( 'eventName'
服务器端会创建`FirRemote`的实例并将其注册到RMI注册表,而客户端则通过RMI获取`FirRemote`的引用并调用`fireEvent`方法。 学习RMI不仅需要理解其基本概念和工作原理,还需要掌握如何编写和配置RMI应用,包括远程...
// 对于IE浏览器,使用fireEvent方法 if(/msie/i.test(navigator.userAgent)) { sub.fireEvent("onclick"); } else { // 对于其他浏览器,创建一个新的MouseEvent事件,并派发该事件 var e = document....
this.fireEvent('onClickSearch', this.search_textfield.getValue()); } }, this); this.search_btn.on('click', function (_btn, e) { this.fireEvent('onClickSearch', this.search_textfield.getValue());...
新媒体平台管理助手 平台基类 所有平台需要默认继承...fireEvent: 触发监听事件 微信公众号平台 WeiXin,调用login后,本地cache路径下会保存一张 二维码图片,扫码验证后,即可保证该对象登陆成功,cookies和token会
3. 在需要触发事件的地方调用`FireEvent`方法,例如:`FireEvent(new Guid(), "MyEventToBeFired");` 这种实现方式避开了直接查找`RaiseMethod`的限制,而是在事件的定义类内部直接调用事件的私有字段来触发事件,...
7. **Element.Event**:这个模块扩展了元素的事件处理,提供了如`addEvent`和`removeEvent`来添加和移除事件监听器,以及`fireEvent`来模拟事件触发。这使得元素的事件管理更加灵活。 8. **String**:MooTools增强...
例如,可以使用`FireEvent`方法触发C++中的事件处理函数,或者通过`SetElementHtml`和`GetElementHtml`方法操作特定HTML元素的HTML内容。此外,还可以利用`SetProperty`和`GetProperty`来修改或读取HTML元素的属性值...
然而,非IE浏览器(如Firefox、Chrome等)并不支持`attachEvent`,它们使用`addEventListener`方法。`addEventListener`的语法如下: ```javascript var btn1Obj = document.getElementById("btn1"); btn1Obj....
sub.fireEvent("onclick"); } else { var e = document.createEvent('MouseEvent'); e.initEvent('click', false, false); sub.dispatchEvent(e); } } ``` 这段代码首先检查浏览器是否为IE,如果是,则使用`...
在IE中,如果按照上述代码绑定,只有`method3`会被执行,而其他浏览器则会先执行`method1`,然后是`method2`,最后是`method3`。 #### IE特有的事件处理 在IE浏览器中,建议在使用`attachEvent`后使用`detachEvent...
- Event OnGetNextStream - Allows you to zip from multiple streams when using the ZipFromStream method. This improves performance since repeated calls to ZipFromStream causes the archive to be updated ...
首先,attachEvent 方法是早期 Internet Explorer 浏览器引入的事件监听方法,它的语法是:`object.attachEvent(event, function)`。这个方法接受两个参数,第一个参数是事件名称(如 "onclick"),第二个参数是要...
Q513198 - Moving focus to TcxDBSpinEdit placed in TdxBarControlContainerItem does not fire the OnExit and OnEnter events and, as a result, does not fire the OnGetText event of a dataset field bound to...
Q513198 - Moving focus to TcxDBSpinEdit placed in TdxBarControlContainerItem does not fire the OnExit and OnEnter events and, as a result, does not fire the OnGetText event of a dataset field bound to...
- **方法(Method)**:分为请求/响应方法(Request/Response Method)和无响应方法(Fire&Forget Method)。前者有对应的响应,后者发送后不等待回应。 - **事件(Event)**:服务端可以主动向客户端发送的事件,...
一个Service Name根据业务的复杂性,可以有多个method和多个Event方法。Service Type列对应SOMEIP协议的消息通信类型。Method方法:client向server请求;Event方法:Server端变化后触发client的注册的回调,client端...
public void invoke(Object[] args, Method method) throws Exception { // 处理事件的逻辑 } }, true); ``` 现在,当C#的`MyComponent`实例调用`TriggerEvent`时,C++和JAVA中的实现将接收到事件并执行相应的...