This tag generates <input type="button">. You normally use a button to trigger a JavaScript function. The list of attributes for this tag is given in Table 3.8.
| Attribute | Description | Possible Value(s) |
|---|---|---|
| property* | The property of the action form mapped to the enclosing form tag that will be associated with the rendered HTML button. In practice, this attribute is often assigned an empty string. | string |
| onclick | A JavaScript event handler that will be triggered upon the clicking of this button. | A JavaScript statement/function |
Table 3.8: The button tag’s attributes
For example, the following button tag is used to trigger the checkDate JavaScript function.
<html:button property="aProperty" value="Check Date" onclick="checkDate()"/>
If you don’t want to map the button to an action form’s property, as is in most cases, you can assign an empty string to the property attribute.
<html:button property="" value="Do It"/>