form.reset() and form.submit() Methods : Form Reset « Form Control « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » Form Control » Form Reset 
form.reset() and form.submit() Methods
   

<html
<head> 
<title>Registration Form</title> 
</head> 
<body
<form name="entries" method="POST" action=""
Enter your first name:<input type="text" name="firstName" id="firstName" /> 
<p>Enter your last name:<input type="text" name="lastName" id="lastName" /></p> 
<p>Enter your address:<input type="text" name="address" id="address" /></p> 
<p>Enter your city:<input type="text" name="city" id="city" /></p> 
<p><input type="radio" name="gender" id="gender1" checked="checked"/>Male 
<input type="radio" name="gender" id="gender2" />Female</p> 
<p><input type="checkbox" name="retired" id="retired" />I am retired</p> 
</form
<p><a href="javascript:document.forms[0].submit()">
  <img alt="image" src="submit.jpg" height="25" width="100" border="0" /></a> 
  <a href="javascript:document.forms[0].reset()">
  <img alt="image" src="reset.jpg" height="25" width="100" border="0" /></a></p> 

</body
</html

   
    
    
  
Related examples in the same category
1.Reset the fields in a form
2.The onreset and onsubmit Event Handlers
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.