-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New pages: HTML<form>FormEnctype (#36278)
* New pages: HTML<form>FormEnctype * New pages: HTML<form>FormEnctype * Update files/en-us/web/api/htmlbuttonelement/formenctype/index.md
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
files/en-us/web/api/htmlbuttonelement/formenctype/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: "HTMLButtonElement: formEnctype property" | ||
short-title: formEnctype | ||
slug: Web/API/HTMLButtonElement/formEnctype | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLButtonElement.formEnctype | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`formEnctype`** property of the {{domxref("HTMLButtonElement")}} interface is the {{Glossary("MIME_type", "MIME type")}} of the content sent to the server when the form is submitted. It reflects the value of the `<button>`'s [`formenctype`](/en-US/docs/Web/HTML/Element/button#formenctype) attribute. | ||
|
||
The value overrides the {{domxref("HTMLFormElement.enctype", "enctype")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the submit button. This property can be retrieved or set. If not set, the value is the empty string (`""`). | ||
|
||
## Value | ||
|
||
A string. | ||
|
||
## Examples | ||
|
||
```js | ||
btnEl.formEnctype = "application/x-www-form-urlencoded"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("HTMLButtonElement.formAction")}} | ||
- {{domxref("HTMLButtonElement.formMethod")}} | ||
- {{domxref("HTMLButtonElement.formNoValidate")}} | ||
- {{domxref("HTMLButtonElement.formTarget")}} | ||
- {{domxref("HTMLFormElement.enctype")}} | ||
- [Sending form data](/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: "HTMLInputElement: formEnctype property" | ||
short-title: formEnctype | ||
slug: Web/API/HTMLInputElement/formEnctype | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLInputElement.formEnctype | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`formEnctype`** property of the {{domxref("HTMLInputElement")}} interface is the {{Glossary("MIME_type", "MIME type")}} of the content sent to the server when the `<input>` with the `formEnctype` is the method of form submission. It reflects the value of the `<input>`'s [`formenctype`](/en-US/docs/Web/HTML/Element/input#formenctype) 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. | ||
|
||
Its value overrides the {{domxref("HTMLFormElement.enctype", "enctype")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the input. This property can be retrieved or set. If not set, the value is the empty string (`""`). | ||
|
||
## Value | ||
|
||
A string. | ||
|
||
## Examples | ||
|
||
```js | ||
inputElement.formEnctype = "application/x-www-form-urlencoded"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("HTMLInputElement.formAction")}} | ||
- {{domxref("HTMLInputElement.formMethod")}} | ||
- {{domxref("HTMLInputElement.formNoValidate")}} | ||
- {{domxref("HTMLInputElement.formTarget")}} | ||
- {{domxref("HTMLFormElement.enctype")}} | ||
- [`<input type="submit">`](/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) |