What is HTML Form Action

In this article I will explain the form action in HTML.
  • 2393

Usually when a user submits the form, you need the system to do something with the data. This is where the action page comes in. The action page is the page that the form is submitted to. For this we can use the action attributes of the form tag.

Example

<html>

<head>

    <title></title>

</head>

<body>

    <form action="inbox.htm" method="get">

    UserName:

    <input type="text" name="Username" value="" maxlength="100" />

    <br />

    Password:

    <input type="password" name="Password" value="" maxlength="100" />

    <input type="submit" value="Submit" />

    </form>

</body>

</html>

 

In this example I created Two textboxes one take the username and another takes the password, when I click the submit Button the inbox.htm page is open as i give this page as a action attribute of the form tag.

 

Output

 form_action.jpg

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 
Programming Answers here

 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.