Image Submit Button






1.05/5 (20 votes)
Apr 24, 2004

47530
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>