# form The **** component allows the content in **input** elements to be submitted and reset. >![](../../public_sys-resources/icon-note.gif) **NOTE:** >This component is supported since API version 6. ## Required Permissions None ## Child Component Supported ## Attribute Attributes in [Universal Attributes](js-components-common-attributes.md) are supported. ## Style Styles in [Universal Styles](js-components-common-styles.md) are supported. ## Event In addition to the events in [Universal Events](js-components-common-events.md), the following events are supported.

Name

Parameters

Description

submit

FormResult

Triggered when the Submit button is touched.

reset

-

Triggered when the Reset button is clicked.

**Table 1** FormResult

Name

Type

Description

value

Object

Values of name and value of the input element.

## Method Methods in [Universal Methods](js-components-common-methods.md) are supported. ## Example: ```
Input text Submit Reset
``` ``` // xxx.js export default{ onSubmit(result) { console.log(result.value.radioGroup) // radio1 or radio2 console.log(result.value.user) // text input value }, onReset() { console.log('reset all value') } } ```