Monday, December 30, 2013

Form with checkboxes

How to create a form with two checkboxes and a submit button.

Code:
<!DOCTYPE html>
<html>
<body>
<form name="input" action="html_form_action.asp" method="get">
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
<input type="checkbox" name="vehicle" value="Car">I have a car
<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>


Output:
Before click button "Submit".
Afetr click button "Submit".