Skip to content

Commit

Permalink
New pages: HTML<form>FormMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle committed Oct 9, 2024
1 parent 556abce commit 328beba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion files/en-us/web/api/htmlbuttonelement/formmethod/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.HTMLButtonElement.formMethod

{{APIRef("HTML DOM")}}

The **`formMethod`** property of the {{domxref("HTMLButtonElement")}} interface represents the form method of the {{HTMLElement("button")}} element. The form method is the {{Glossary("HTTP")}} method used to submit the {{HtmlElement("form")}} when the form is submitted. It reflects the value of the `<button>`'s [`formmethod`](/en-US/docs/Web/HTML/Element/button#formmethod) attribute.
The **`formMethod`** property of the {{domxref("HTMLButtonElement")}} interface is the {{Glossary("HTTP")}} method used to submit the {{HtmlElement("form")}} if the {{HTMLElement("button")}} element is the control that submits the form. It reflects the value of the `<button>`'s [`formmethod`](/en-US/docs/Web/HTML/Element/button#formmethod) attribute.

The value overrides the {{domxref("HTMLFormElement.method", "method")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the button. This property can be retrieved or set. If set with an empty or invalid value, the invalid default value is `"get"`. If not set at all, the value is the empty string (`""`).

Expand Down Expand Up @@ -36,4 +36,5 @@ btnEl.formMethod = "post";
- {{domxref("HTMLButtonElement.formEnctype")}}
- {{domxref("HTMLButtonElement.formNoValidate")}}
- {{domxref("HTMLButtonElement.formTarget")}}
- {{domxref("HTMLFormElement.method")}}
- [Sending form data](/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data)
7 changes: 5 additions & 2 deletions files/en-us/web/api/htmlinputelement/formmethod/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ browser-compat: api.HTMLInputElement.formMethod

{{APIRef("HTML DOM")}}

The **`formMethod`** property of the {{domxref("HTMLInputElement")}} interface represents the form method of the {{HTMLElement("input")}} element. The form method is the {{Glossary("HTTP")}} method used to submit the {{HtmlElement("form")}} when the `<input>` is the method of form submission. It reflects the value of the `<input>`'s [`formmethod`](/en-US/docs/Web/HTML/Element/input#formmethod) attribute.
The **`formMethod`** property of the {{domxref("HTMLInputElement")}} interface is the {{Glossary("HTTP")}} method used to submit the {{HtmlElement("form")}} if the {{HTMLElement("input")}} element is the control that sumbits the form. It reflects the value of the `<input>`'s [`formmethod`](/en-US/docs/Web/HTML/Element/input#formmethod) attribute.

This property is valid only for [`submit`](/en-US/docs/Web/HTML/Element/input/submit) and [`image`](/en-US/docs/Web/HTML/Element/input/image) `<input>` elements.

The value overrides the {{domxref("HTMLFormElement.method", "method")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the input. This property can be retrieved or set. If set with an empty or invalid value, the invalid default value is `"get"`. If not set at all, the value is the empty string (`""`).

Expand Down Expand Up @@ -36,6 +38,7 @@ inputElement.formMethod = "post";
- {{domxref("HTMLInputElement.formEnctype")}}
- {{domxref("HTMLInputElement.formNoValidate")}}
- {{domxref("HTMLInputElement.formTarget")}}
- {{domxref("HTMLFormElement.method")}}
- [`<input type="submit">`](/en-US/docs/Web/HTML/Element/input/submit)
- [`<input type="image">`](/en-US/docs/Web/HTML/Element/input/submit)
- [`<input type="image">`](/en-US/docs/Web/HTML/Element/input/image)
- [Sending form data](/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data)

0 comments on commit 328beba

Please sign in to comment.