Click to Rate and Give Feedback
Properties
 action Property
ACTION Attribute | action Property
Note: This documentation is preliminary and is subject to change.

Sets or retrieves the URL to which the form content is sent for processing.

Syntax

HTML<ELEMENT ACTION = sURL... >
Scripting[ sURL = ] object.action

Possible Values

sURLString that specifies or receives the URL to use. If a relative path is specified, the base URL of the document is assumed.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

The way the data is submitted depends on the value of the method and encoding properties.

In Windows Internet Explorer 8 and greater the way the data is submitted depends on the value of the method and enctype properties.

Examples

This example uses the ACTION attribute to post a form to a specified URL.

<HTML>
   <FORM ACTION="http://example.microsoft.com/sample.asp" 
      METHOD="POST">
      Enter your name: <INPUT NAME="FName"><BR>
      Favorite Ice Cream Flavor:
      <SELECT NAME="Flavor">
         <OPTION VALUE="Chocolate">Chocolate
         <OPTION VALUE="Strawberry">Strawberry
         <OPTION VALUE="Vanilla" SELECTED>Vanilla
      </SELECT>
      <P><INPUT TYPE=SUBMIT>
   </FORM>
</HTML>

This example uses the ACTION attribute to specify a URL for the mailto protocol.

<form ACTION="mailto:[email protected]" method=GET>
  <input name=subject type=hidden 
     value="Widget%20Product%20Information%20Request">
  Enter your full mailing address<BR>
  <TextArea name=body cols=40></textarea>
  <input type=submit value="Send Request"
</form>

Standards Information

This property is defined in HTML 3.2 World Wide Web link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

FORM, ISINDEX
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker