|
The Form’s Action Attribute and the Submit Button |
|
name |
name attribute defines the name of the form. Because a page can have more than one form. |
action |
action defines the action of form. (to which this form have to send its values). |
method |
method defines the type of method used to send the values of the form. |
method have two types of values. i.e. method=”post”, method=”get”. |
|
|
When the user clicks on the “Submit” button, the content of the form is sent to another file. The form’saction attribute defines the name of the file to send the content to. The file defined in the action attribute usually does something with the received input. |
|
example |
page in browser will look like |
<form name=”input” action=”forms_regisration.asp”
method=”post”>
Username:
<input type=”text” name=”user” size=”20″><br>
Password :<input type=”password” name=”pass” size=”20″>
<br><input type=”submit” value=”Submit”>
</form> |
|
|
|
If you type some characters in the text field above, and click the “Submit” button, you will send your input to a page called “forms_regisration.asp”. That page will show you the received input. |