Tuesday 29 November 2011

HTML Tutorial - 10

How to create form with checkboxes 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">
<input type="checkbox" name="Mobile" value="Nokia" /> I have a Nokia<br />
<input type="checkbox" name="Mobile" value="Samsung" /> I have a Samsung
<br /><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 submit the form.


Click on the submit button to submit the data to a page called "html_form_action.asp"
 

No comments:

Post a Comment

Newest