Instruction
1
Using descriptor <input> adds a button to a page with name name and value value. The name attribute gives the element a unique identifier and is used to determine the form handler its value. Value displays the text over the top. For example, to create a button write the following code:
<form>
<input type = “button” name = “name” value = “Send”>
</form>
This command will create a button with the name button and says "Sending" on it.
<form>
<input type = “button” name = “name” value = “Send”>
</form>
This command will create a button with the name button and says "Sending" on it.
2
Handle <button> creates a similar <input> element, but offers the use of many optional parameters that you may need a web developer. So, on top of <button> you can insert the table or figure, formatted text or list. For example:
<button form = “form id” formaction = “url” formmethod = “shipment method data” name = “name” type = “type” value = “value”><img src = “path to image”><b>Text</b></button>
<button form = “form id” formaction = “url” formmethod = “shipment method data” name = “name” type = “type” value = “value”><img src = “path to image”><b>Text</b></button>
3
The form attribute specifies the ID of the form that will be used for data processing. Formaction sets the form handler in another part of the document, another file or website. Formmethod responsible for determining the method of transmitting data. Name specifies the name of the button type – the type (regular, to send the data or clear the form). Value – the value that will be read by scripts. The button image will be displayed with the specified address and bold text.
4
To create a button that will process the data entered in the attribute must specify the relevant type:
<input type = “submit”>
To create a button that erases the user input, set type = “reset”.
<input type = “submit”>
To create a button that erases the user input, set type = “reset”.
Note
A handle to the <input> must be used as the content of the <form> tag. Button <button> can be displayed outside the form, but to process data and perform a specific action, it also must be enclosed between <form></form>.