TOC

The community is working on translating this tutorial into Marathi, but it seems that no one has started the translation process for this article yet. If you can help us, then please click "More info".

Forms:

Submit & Reset Buttons

Buttons are defined by changing the input element’s type attribute. There is two different kinds of buttons – the submit button and the reset button.

The submit button is used whenever you want to submit a form and the markup looks like this:

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

The reset button is used to clear al inputs by the user and the markup looks like this:

<input type="reset" value="Reset" />

Here is a simple form with both a submit button and a reset button

<form action="url-to-formmail-provided-by-your-ISP" method="post">
	First name: <input type="text" name="firstname" /> <br />
	Surname: <input type="text" name="surname" /><br />
	<input type="reset" value="Clear form" />
	<input type="submit" value="Submit now" />
</form>

The submit-button must always be the last value selected, as it initiates the form submission whereas the reset-button can be pressed at all times during the form fill out.


This article has been fully translated into the following languages: Is your preferred language not on the list? Click here to help us translate this article into your language!
adplus-dvertising