Contents
- Index
How to add a event handler
In this section, you will learn how to create a web application with following feature.
l This application has one button with caption *say something*.
l When user clicks that button, an asynchronous message box drops down from top of web page saying *hello, world*.
After you add a button component to your web page by dragging it from *Component Gallery*, a button will appear on your web page. Click the button to select it.
Click the plus before *events* in *Object Inspector*, then all the event for button will collapse.
Click *events | onClick* and then value of *event | onClick* will high light, as the following figure shows.

Click the button on the right side to pop up a dialog like the following figure.

Input the following text.
function (profile, e, value) {
linb.message("hello, world");
}
Press *Save All* tool button to make sure everything changed is saved. Press *Debug* button to preview what happens, as is showed in the following figure.