HTML Reset Button Example
<input type="reset">
Reset tag is a button that resets the contents of the form to default values.
HTML Reset Button Example
program
<!DOCTYPE html>
<html>
<body>
<h2>Reset Button</h2>
<p>Reset button that will be reset 
all form values to their default values </p>
 <form action="/action.asp">
 First Name :<input type="text"
 name="firstname" value="Surya"><br>
 Last name :<input type="text"
 name="lastname" value="Rad"><br><br>
 <input type="submit" value="Submit">
<input type="reset">
</form>
<p>If you change the input values 
and then click the "Reset"
 button,<br> the form-data will 
be reset to the default values.</p>
</html>
HTML Reset Button Example
Explain Program
Step 1 ]
<!Doctype html>
- <!doctype html>  always be the first line of any HTML document.
 
<!Doctype html>
- <!doctype html> always be the first line of any HTML document.
 
Step 2 ]
   <html> and </html>
   html  is the root element.
<html> and </html>
html is the root element.
Step 3 ]
<body> and </body>
body  is  main content area.
All visible content inside to  the <body> tag
<body> and </body>
body is main content area.
All visible content inside to the <body> tagStep 4]
 <form action="/action.asp">
form submitted it send data to server/action.asp
Step 5]
 First Name :<input type="text"
 name="firstname" value="Surya"><br>
text input field label  first name ,value  = surya  
Last name :<input type="text"
name="lastname" value="Rad"><br><br>
text field labeled Last name
Step 6]
 <input type="submit" value="Submit">
create submit button send data form URL 
value  submit  is text shows on button
Step 6]
<input type="reset">
Create a reset button
click reset button their original value, clear form and restore default value.
Step 6]
<P> tag  
Closing html tag 
HTML Reset Button Example
output
Related Post :-
No comments:
Post a Comment