Is there a way to make a form input of type image to have a rollover image?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Try this?
<input type="image" value="someValue" src="yourImage.gif" width="widthInPixels" height="heightInPixels" onmouseover="this.src='yourImageRollover.gif';" onmouseout="this.src='yourImage.gif';">
回答2:
The same way as any other image. Change the src
property when the mouseover
event fires.
回答3:
I would just use a normal submit input and use css sprites on it.
http://www.alistapart.com/articles/sprites