Use Image to trigger submit and reset actions : Form Submit « Form Control « JavaScript DHTML

Use Image to trigger submit and reset actions


<title>Registration Form</title> 
<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> 
<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> 



Related examples in the same category

1.Form Submit action
2.Return the method used when sending form data
3.Submit a form Via Enter
4.Convert a passed form reference to a string formatted like a JavaScript array of objects
5.Use form select control to trigger the action
6.form on submit event
7.Last-Minute Checking Before Form Submission
8.Submit a form by sending out an email
9.Adjusting a Server Submission Action
10.Demo: Ajax form submit
11.html input mask