Submit Button
A button that submit the form.<input type ="submit"> defines button for submitting form data form-handler. The form-handler is typically server page with the script for processing input data. the form -handler is specified in the forms action attribute.
⭐Submit Button in HTML
program
<!DOCTYPE html>
<html>
<body>
<h2>Submit Button</h2>
<p>The <strong>input type="submit"</strong>
defines a button for
submitting form data to a form-handler:</p>
<form action="/action.asp">
First name:<br>
<input type="text" name="firstname"
value="Sanjay"><br>
Last name: <br>
<input type="text" name="lastname"
value="jadhv"><br><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit"form-data
will be sent page
called "/action.asp"</p>
</body>
</html>
HTML Submit Button in HTML
Explain Program
Step 1 ]
<!DOCTYPE html>
- Declares the document type.
Step 2 ]
<html>...</html>
- The
root element that wraps all content of the webpage.
Step 3]
<body>...</body>
- Contains
everything visible to the user on the web page.
Step 4 ]
<h2>Submit
Button</h2>
- Displays
a heading that says "Submit Button".
Step 5 ]
<p>...</p>
- paragraph explaining <input type="submit"> does:
- It
creates a button that submits the form data.
Step 5 ]
First name:<br>
<input type="text" name="firstname" value="sanjay"><br>
<input type="text" name="lastname" value="jadhv"><br><br>
- Creates
two text fields:
- One
for First Name with a default value "sanjay"
- One
for Last Name with a default value "jadhv"
- <br> line break, making each input appear on a new line.
No comments:
Post a Comment