forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 0
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>FormAction (mdn#36272)
* New pages: HTML<form>FormAction * New pages: HTML<form>FormAction * New pages: HTML<form>FormAction * Apply suggestions from code review Co-authored-by: wbamberg <[email protected]> * Update files/en-us/web/api/htmlinputelement/formaction/index.md --------- Co-authored-by: wbamberg <[email protected]>
- Loading branch information
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
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,39 @@ | ||
--- | ||
title: "HTMLButtonElement: formAction property" | ||
short-title: formAction | ||
slug: Web/API/HTMLButtonElement/formAction | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLButtonElement.formAction | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`formAction`** property of the {{domxref("HTMLButtonElement")}} interface is the URL of the program that is executed on the server when the form that owns this control is submitted. It reflects the value of the `<button>`'s [`formaction`](/en-US/docs/Web/HTML/Element/button#formaction) attribute. | ||
|
||
The value overrides the {{domxref("HTMLFormElement.action", "action")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the button. This property can be retrieved or set. | ||
|
||
## Value | ||
|
||
A string. The URL for form submission. | ||
|
||
## Examples | ||
|
||
```js | ||
btnEl.formAction = "/cgi-bin/publish"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("HTMLButtonElement.formEnctype")}} | ||
- {{domxref("HTMLButtonElement.formMethod")}} | ||
- {{domxref("HTMLButtonElement.formNoValidate")}} | ||
- {{domxref("HTMLButtonElement.formTarget")}} | ||
- [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,43 @@ | ||
--- | ||
title: "HTMLInputElement: formAction property" | ||
short-title: formAction | ||
slug: Web/API/HTMLInputElement/formAction | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLInputElement.formAction | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`formAction`** property of the {{domxref("HTMLInputElement")}} interface is the URL of the program that is executed on the server when the form that owns this control is submitted. It reflects the value of the `<input>`'s [`formaction`](/en-US/docs/Web/HTML/Element/input#formaction) 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.action", "action")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the input. This property can be retrieved or set. | ||
|
||
## Value | ||
|
||
A string. The URL for form submission. | ||
|
||
## Examples | ||
|
||
```js | ||
inputElement.formAction = "/cgi-bin/publish"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- {{domxref("HTMLInputElement.formEnctype")}} | ||
- {{domxref("HTMLInputElement.formMethod")}} | ||
- {{domxref("HTMLInputElement.formNoValidate")}} | ||
- {{domxref("HTMLInputElement.formTarget")}} | ||
- [`<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) |