# form The **\
** component allows the content in **input** elements to be submitted and reset. ## Required Permissions None ## Child Component Supported ## Attributes Attributes in [Universal Attributes](js-components-common-attributes.md) are supported. ## Styles Styles in [Universal Styles](js-components-common-styles.md) are supported. ## Events In addition to the events in [Universal Events](js-components-common-events.md), the following events are supported. | Name | Parameters | Description | | ------ | --------------------------------------------- | -------------------------------------------- | | submit | [FormResult](js-components-container-form.md) | 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. | ## Methods Methods in [Universal Methods](js-components-common-methods.md) are supported. ## Example ```
Enter 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') } } ``` ![img](figures/001.gif)