In a browser, events are typically generated in response to user actions: a button fires an ONCLICK event when the user clicks.
在浏览器中,通常为响应用户操作而生成事件:当用户单击按钮时,按钮产生一个ONCLICK事件。
The code does not use the traditional onClick within the button but USES the Dojo events system to register a method to call upon loading of the page.
代码没有在按钮内使用传统的onClick,而是使用Dojo事件系统注册一个在装载页面时调用的方法。
The onClick handler sets the current color of the board based on whether the user clicks the X or o button.
onClick处理程序根据用户点击的是X还是o按钮设置面板的当前颜色。
The Refresh button refreshes the list of tables in the cbTable combobox, and its OnClick event handler is implemented as follows
Refresh按钮将刷新 cbTable combobox 中的表的列表,其OnClick事件处理程序的实现如下所示
For example, if you want the progress bar to start when the user clicks a button, you can add an onclick event to the button, using the code that you see in Listing 1.
例如,如果您想要这个进展在用户点击一个按钮时开始,您可以在一个按钮上添加一个onclick事件,使用您在列表1中所看到的代码。
Optionally, for better usability, add the following line of code to the onclick event for the edit button.
为了获得更好的可用性,可以选择将以下代码行添加到编辑按钮的onclick事件。
The example in Listing 18 shows the onclick event emitted by a button being mapped to an event handler.
清单18中的例子显示一个按钮发出的onclick事件,该事件被映射到一个事件处理程序。
To invoke this method, you need to handle the "button pressed" event for the operation buttons, which is done by simply assigning a method named onclick to each button. For example.
要调用此方法,需要处理操作按钮的“按钮按下”事件,这可通过向每个按钮分配一个名为onclick的方法完成。
So you can change the event that's run on a button: you just assign a new function to the onclick property.
因此可以改变按钮触发的事件:只要赋给onclick属性一个新的函数。
Listing 1.adding an onclick event to the user interface button.
列表1 .添加一个onclick事件到用户界面的按钮上。
For example, instead of an onchange event for each edit box, use the onclick event of one button.
例如,与每一个编辑框具有一个onchange事件相反,使用一个按钮的onclick事件。
A button has an argument named onclick whose value is a Callback, a snippet of imperative application logic to be executed when the event occurs. In this particular case two things happen.
按钮拥有名为onclick的参数,它的值是Callback,当事件发生的时候,就会执行一段命令式的应用程序逻辑。
Then, submitForm() returns false so that the onclick expression of the Send button can return false, indicating the Web browser must not submit the form data to the server.
然后,submitForm()返回false,因此Send按钮的onclick表达式返回 false,指示Web浏览器不要将表单数据提交到服务器。
In general, you can pass information from the server runtime to the browser by embedding a server-side script in the client-side code. The following is a client-side onclick event for a button.
通常,通过在客户端代码中嵌入服务器端脚本,可以将信息从服务器运行时传递到浏览器。
The user variable is created and referenced by appending a period and name to the name of the scope object. For example, if a button has the following server-side onclick script.
通过在scope对象名称后附加句点和名称来创建并引用用户变量。
The user variable is created and referenced by appending a period and name to the name of the scope object. For example, if a button has the following server-side onclick script.
通过在scope对象名称后附加句点和名称来创建并引用用户变量。
应用推荐