Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set image as submit button

Tags:

html

webforms

i am using following code to set an image as submit button

 *<input type="submit" src="submit1.jpg" alt="submit Button"onMouseOver="this.src='submit1.jpg'">*

but i actually did not know at which place in whole code to put this line of code because i put it after but it is not working

at which place i put this code there appear "submit query" but i want it to submit query at buuto i also use

input type="image"

actually i want to ask from which place i start this code "from which line?"

like image 280
Muhammad Hussain Avatar asked Jan 03 '10 09:01

Muhammad Hussain


2 Answers

Change type from input to image and add value as submit:


<input type="image" value="submit" src="submit1.jpg" alt="submit Button" onMouseOver="this.src='submit1.jpg'">
like image 78
DoctorLouie Avatar answered Sep 30 '22 01:09

DoctorLouie


This is complete HTML document:

<form name="someform" action="http://www.google.com">
<input type="image" width="100" value="submit" src="image1.png" alt="submit Button" onMouseOut="this.src='image1.png'" onMouseOver="this.src='image2.png'">
</form>

Note that "onmouseout" event is used to bring the button to previous form when mouse is not over

like image 25
alemjerus Avatar answered Sep 30 '22 03:09

alemjerus