Click here to Skip to main content
15,898,035 members
Articles / Programming Languages / Javascript
Article

Image Submit Button

Rate me:
Please Sign up or sign in to vote.
1.05/5 (23 votes)
23 Apr 2004 47.5K   7  
Submitting forms in javascript.

Introduction

This is the code for how to use an image as a submit button. Remember to include a name or id attribute in the form tag at the beginning. Also, make sure that you change form_name to the form name or id attribute. Change image_name.extension to the name of the image. Make sure that you spell everything correctly to ensure that the code does it right. This is cool for buttons that look bad on certain browsers or operating systems.

<a href="javascript:document.form_name.submit();"><img src="image_name.extension"></a>

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --