asp.net.ph

Skip Navigation Links

ACTION Attribute | action Property

Language References


Specifies the URL to which the FORM content is to be sent for processing.

Applies To: FORM

Syntax


Inline <form action = strURL...>
Script form.action = strURL

Possible Values


strURL String specifying the URL to be used. If a relative path is specified, the base URL of the document is assumed.

The property is read/write with no default value.

Remarks

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

Example

In the following example, the URL to which the form is posted ( "http://somesite.com/test" ) is specified after the action attribute.

<form action="http://somesite.com/test" method=POST>
Enter your name: <input name="fname"><br>
Favorite IceCream Flavor...
<select name="flavor">
   <option value="Chocolate">Chocolate
   <option value="Strawberry">Strawberry
   <option value="Vanilla" selected>Vanilla</select>
<p></p>
<input type=submit value="Send">
</form>

In the following example, the URL specified in the action attribute uses the mailto: protocol.

<form action="mailto:sales@widgets.com" method=GET>
<input name=subject type=hidden value="Widget Product Information Request">

Enter your full mailing address<br> <textArea name=body cols=40></textarea>
<input type=submit value="Send Request"
</form>
Applies To

FORM



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note