Fixing that particular problem lies in defining an event handler for the button's "onClick" event, again just like what a developer would write for an HTML form.
修正这个问题,只要给按钮的“ onClick ”事件定义一个事件处理器就可以了,跟编写HTML表单是一样的。
The attributes (like background, alink, bgcolor, etc.) and events (like onClick, onDblClick, onKeyPress, etc.) of this HTML element can be set using the getter/setter methods of this class.
这个 HTML 元素的属性 (如 background、 alink、 bgcolor等) 和事件 (如 onClick、 onDblClick、 onKeyPress等) 可以用这个类的 getter/setter 方法设置。
If you look at the HTML, you'll see that the event you deal with here is onClick.
查看HTML就会发现这里处理的事件是onClick。
应用推荐