Ultra fast cheap  linux and windows hosting
javascript tutorial Browse Basic JavaScript Tutorial
Browse JavaScript Script resources
Browse javascript FAQS
Categories:

javascript tutorial
buy template
Home >> Tutorials >> Advanced javascript tutorials

Javascript Image submit button

Previous page and Next pageImage buttonAlert button
Prompt buttonScrolling buttonRotating button
Confirmation button  

 

Can I use cool looking images as submit button instaed of the default submit button? Yes, you can use Image as submit buttons. When a visitor clicks an image button the form is sent to the address specified in the action setting of the <FORM> tag.

Below is a listing of valid settings for image buttons:

  • The name setting adds an internal name to the image button so the program that handles the form doesn't confuse it with the other fields.
  • The src setting defines the URL of the image.
  • The align setting defines how the image is aligned. Valid entries are: TOP, MIDDLE, BOTTOM, RIGHT, LEFT, TEXTTOP, BASELINE, ABSMIDDLE, ABSBOTTOM. The alignments are explained in the image section.
  • The border setting defines the width (in pixels) of the border around the image.
  • The width setting defines the width of the image.
  • The height setting defines the height of the image.
  • The vspace setting defines the spacing over and under the image (in pixels).
  • The hspace setting defines the spacing to the left and right of the image (in pixels).
  • The tabindex setting defines in which order the different fields should be activated when the visitor clicks the tab key.

Source Code:
<form name="myform" >
<div align="center">
<br><br> <input type="text" size="25" value="Enter your name here!"> <br>
<input type="image" src="rainbow.gif" name="image" width="60" height="60"><br>
</div>
</form>

Top


Page contents: itechies.net - Learn how to create image submit buttons using javascript.
javascript tutorial
javascript book
Buy this book