The best HTML DOM Form Object Tutorial In 2024, In this tutorial you can learn Form Object,Form objects collected,Form Object Properties,Form Object,Form object event,Standard properties and events,
Form object represents an HTML form.
In an HTML document <form> Each occurrence, Form object is created.
Users typically forms used to collect user data, including the input elements such as: text fields, check boxes, radio buttons, submit buttons wait. Forms can also be said the Options menu, textarea, fieldset, legend, and label elements.
Forms are used to send data to the server.
W3C: W3C standards.
集合 | 描述 | W3C |
---|---|---|
elements[] | 包含表单中所有元素的数组。 | Yes |
属性 | 描述 | W3C |
---|---|---|
acceptCharset | 服务器可接受的字符集。 | Yes |
action | 设置或返回表单的 action 属性。 | Yes |
enctype | 设置或返回表单用来编码内容的 MIME 类型。 | Yes |
length | 返回表单中的元素数目。 | Yes |
method | 设置或返回将数据发送到服务器的 HTTP 方法。 | Yes |
name | 设置或返回表单的名称。 | Yes |
target | 设置或返回表单提交结果的 Frame 或 Window 名。 | Yes |
方法 | 描述 | W3C |
---|---|---|
reset() | 重置一个表单 | Yes |
submit() | 提交一个表单 | Yes |
事件 | 描述 | W3C |
---|---|---|
onreset | 在重置表单元素之前调用。 | Yes |
onsubmit | 在提交表单之前调用。 | Yes |
Form object also supports the standard attributes and events .