Adding a Button in Input Field
29-01-18 Course- HTML5-Simple
The <input type=”button”> tag in an HTML code places a button control on an HTML form. A button is added on a Web form to activate a JavaScript when a user clicks the button. Therefore, to send the data to the Web server, you need to use JavaScript to perform an action on the click event of button.
Let’s do the following steps to add a button on a Web page:
<!DOCTYPE html>
<html>
<head>
<title> Adding Button in input Field</title>
</head>
<body>
<form action=””>
First name: <input type=”text” name=”firstname” size=”30” /> <br/>
Last name: <input type=”text” name=”lastname” size=”30” /> <br/>
<input type”button” value=”Submit” />
</form>
</body>
</html>
Save the document with the name AddingButton.html and open on browser.