How to create Form with text fields and a submit button in Html Script ?
Solution :
Step 1: Go to Notepad.
Step 2: Copy the HTML script below to the notepad.
<html>
<body>
<form name="input" action="html_form_action.asp" method="get">
First name: <input type="text" name="FirstName" value="New" /><br />
Last name: <input type="text" name="LastName" value="Bengaluru" /><br />
<input type="submit" value="Submit" />
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>
</body>
</html>
Step 3: Now save the file with .html format.
Step 4: Close the notepad and now open the saved file in your default browser .
That's it !
You will see like the below picture in your browser to enter your First name, Last name and a submit button to submit the information.
Solution :
Step 1: Go to Notepad.
Step 2: Copy the HTML script below to the notepad.
<html>
<body>
<form name="input" action="html_form_action.asp" method="get">
First name: <input type="text" name="FirstName" value="New" /><br />
Last name: <input type="text" name="LastName" value="Bengaluru" /><br />
<input type="submit" value="Submit" />
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>
</body>
</html>
Step 3: Now save the file with .html format.
Step 4: Close the notepad and now open the saved file in your default browser .
That's it !
You will see like the below picture in your browser to enter your First name, Last name and a submit button to submit the information.
Click on the submit button to submit the data to a page called "html_form_action.asp" |
No comments:
Post a Comment