html form object,HTML Form Object

本文详细介绍了HTML中的FormObject,包括其如何代表HTML表单、收集用户输入的方式、以及包含的各种元素如文本框、复选框等。同时,还探讨了表单对象的集合、属性、方法和事件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Form Object

The Form object represents an HTML form.

For each

tag in an HTML document, a Form object is created.

Forms are used to collect user input, and contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select menus, textarea, fieldset, legend, and label elements.

Forms are used to pass data to a server.

Form Object Collections

W3C: W3C Standard.

Collection

Description

W3C

Returns an array of all elements in a form

Yes

Form Object Properties

Property

Description

W3C

Sets or returns the value of the accept-charset attribute in a form

Yes

Sets or returns the value of the action attribute in a form

Yes

Sets or returns the value of the enctype attribute in a form

Yes

Returns the number of elements in a form

Yes

Sets or returns the value of the method attribute in a form

Yes

Sets or returns the value of the name attribute in a form

Yes

Sets or returns the value of the target attribute in a form

Yes

Form Object Methods

Method

Description

W3C

Resets a form

Yes

Submits a form

Yes

Form Object Events

Event

The event occurs when...

W3C

The reset button is clicked

Yes

The submit button is clicked

Yes

Standard Properties, Methods, and Events

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值