创建和配置标记处理函数。
对于标准事件,事件处理函数是预定义的。
清单8说明这些事件处理函数的结构。
Listing 8 demonstrates the structure of these event-handlers.
留意所有神奇的数据结构及数据结构处理函数。
Keep an eye out for all the amazing data structures and data structure processing functions.
清单1展示了定制标记的处理函数是什么样的。
Listing 1 shows what the handler of the custom tag should look like.
事件处理函数将被阻塞直到UI线程能够处理它。
The event handler will be blocked until the UI thread is able to process it.
清单2展示如何使用click处理函数提交表单。
Listing 2 shows how to submit a form using the click handler.
datetime包含有用的日期和时间处理函数。
Datetime contains useful date and time manipulation functions.
这个例子说明可以像处理其他变量一样处理函数。
This example shows that I can treat a function just as I treat any other variable.
在事件处理函数中可以使用以下语法调用动作
Actions can be invoked inside event-handlers using the following syntax
清单6显示的是小部件样例的事件处理函数和回调函数。
Listing 6 shows the event handlers and the callback function of the sample widget.
应用程序的退出处理函数或清理例程可以调用这个例程。
This routine can be called as a part of the application's exit handler or clean up routines.
然后可以使用Dojo为按钮点击关联一个事件处理函数。
You then use Dojo to associate an event handler for when the button is clicked.
每个事件有一个处理函数,即在发生此事件时执行的代码块。
Every event has a handler which is a block of code that is executed in response to the occurrence of the event.
清单1显示了如何使用submit处理函数提交一个表单。
Listing 1 shows how to submit a form using the submit handler.
将Comet事件传递给处理函数机制的代码如清单5所示。
The code to pass Comet events to such a handler mechanism may look like Listing 5.
在刚启动时调用这个事件处理函数,将初始屏幕内容设置为可见。
This event handler is called at the very beginning so that the initial screen contents can be set to be viewed.
事件处理函数名必须与定义文件中的名称匹配,而此名称由用户定义。
The name of the event handler must match the name declared in the definition file in which the name is user definable during definition time.
尽管以上两种选择都是有效的,但submit处理函数更为常用些。
Although both of the above options are valid, the submit handler is more commonly used.
这可能包括事件关联函数、事件处理函数、错误方法和计时器方法。
This might include the event hooks, the event handler, the error methods, and the timer methods.
注意,条件函数并不是异步信号安全的,因此不能在信号处理函数中调用。
Note that condition functions are not asynchronously signal-safe and should not be called from a signal handler.
例如,onmousemove等鼠标事件处理函数常常会产生大量调用。
Hover event handlers such as onmousemove often produce a large number of events.
在jQuery中使用事件处理函数时,上下文变量是指触发事件的元素。
When using event handlers in jQuery, the context variable refers to the element that fired the event.
事件处理函数接受一个ElapsedEventArgs类型的参数。
The event handler receives an argument of type ElapsedEventArgs.
这个事件处理函数启动一个新的服务器,通过在它上面执行一系列命令来配置它。
The event handler starts a new server and configures it by executing a sequence of commands on it.
如果应用程序包含表单,那么可以在表单处理函数上设置断点并查看输入的参数。
If the application had forms, you could set a breakpoint at the form handler and view the incoming parameters.
清单4. register . js中提交按钮的Click处理函数。
Listing 4. Click handlers for the submit buttons in register.js.
然后VS就会自动地在我们的后台代码类文件中创建一个占位的事件处理函数实现。
VS will then automatically create a stub event handler implementation in our code-behind class file. We can use this event handler to update the Button's content with a new message when it is clicked.
文档准备好后,您需要为Register和Login按钮分配click处理函数。
When the document is ready, you assign the click handler to the Register and Login buttons.
将状态表实现为适用于所有事件的通用处理函数,并为所有操作和转换提供一个函数数组。
You implemented your state table as a common handler for all events, plus a function array for all actions and transitions.
应用推荐