tags:

views:

32

answers:

5

I have a default button. So now how do I make it a button image? So when you click on the button the normal thing happens. What I just want is an Image on the button. Thanks.

A: 

Try putting an image instead of a button and handle its onclick event.

Sidharth Panwar
But the button has a submit function..How do i do that with an image ?
5416339
<input type="image" src="butup.gif" alt="Submit button">
Sidharth Panwar
A: 

You can use an image as a button by specifying the src property:

<input type="image" name="submit" value="submit" src="images/button.gif" />
tjk
A: 

you can use javascript with some logic.

create one button with style attribute style="display:block" also create required image just next to button with style="display:none"

onclick of button call javascript function.

function disphide()
{
    btn.style.display='none';
    img.style.display='block';
}

This should work

Akie
+1  A: 

you could try:

<button style="display:block; background: url(/path/to/image.png) no-repeat center;">
    Push me!
</button>
thomasmalt
A: 

You may try this:

<INPUT TYPE="image" SRC="image location" ALT="SUBMIT">

Hope it solves your problem.

Anjali