View Full Version : submit button as image

02-11-2004, 11:59 PM
i have a submit button with the following code.
<input type="submit" name="btnadd" value="Add">

However, now i want to use an image as a button. How am i going to code it?

cdn lover
02-12-2004, 12:38 AM
add this to your <head>:

<script language="javascript">
function submitForm() {

(Replace formName with the name of the form)

now call the function with a <a> tag:

<a href="javascript:submitForm()"><img src="pic.gif" bordor="0"></a>

replace "pic.gif with the image you want to use.

02-12-2004, 01:51 AM
No need to use javascript...

<input type="image" src="image.gif" name="submit" value="submit">