action
action
This page has been flagged with the following issues:
High-level issues:
Summary
Sets or retrieves the URL to which the form content is sent for processing.
| Applies to | ? |
|---|
Examples
This example uses the action attribute to post a form to a specified URL.
HTML
<form action="/sendmail.asp" method="get"> <input name="subject" type="hidden" value="Widget Product Information Request" /> <label for="body">Please enter your email body</label> <textarea name="body" cols="40"></textarea> <input type="submit" value="Send Request" /> </form>
Notes
Remarks
Windows Internet Explorer 8 or later. In IE8 Standards mode, the value of the action attribute depends on the context of the reference to the attribute. When read as a Document Object Model (DOM) attribute, action returns an absolute URL. The value specified by the page author is returned when action is read as a content attribute, when the page is displayed in an earlier document compatibility mode, or when the page is viewed with an earlier version of the browser. For more information, see Attribute Differences in Internet Explorer 8. The value of the action attribute depends on the context of the reference to the attribute. When read as a DOM attribute, action returns an absolute URL. The value specified by the page author is returned when action is read as a content attribute.
Mailto actions
It is possible to make an email form by placing an mailto address in the action attribute. Although it is technically possible, we recommend strongly to 'not' use them, as it doesn't work in every browser as it was once supposed to. Please use an email script instead, and make the form post to that certain email script.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 17.3
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic Support | Beta | 1 | 3 | 3 |
0.8 |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic Support | 1 | 6 | Beta | 14 | 2 | 3 | Beta | 3 |
See also
Related pages (MSDN)
formisIndex
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here