View Full Version : submit button as image

02-12-2004, 12:59 AM
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, 01: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, 02:51 AM
No need to use javascript...

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