0

Is there a way to make a form input of type image to have a rollover image?

shinjuo
  • 20,498
  • 23
  • 73
  • 104

3 Answers3

3

Try this?

<input type="image" value="someValue" src="yourImage.gif" width="widthInPixels" height="heightInPixels" onmouseover="this.src='yourImageRollover.gif';" onmouseout="this.src='yourImage.gif';"> 
martincarlin87
  • 10,848
  • 24
  • 98
  • 145
2

The same way as any other image. Change the src property when the mouseover event fires.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
1

I would just use a normal submit input and use css sprites on it.

http://www.alistapart.com/articles/sprites

Galen
  • 29,976
  • 9
  • 71
  • 89