471,605 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

html image instead of button

how do you subtitute image instead of button

for example: i have this code below:
and it has a defualt button. how do i replace it with a image button.
i dont have a image yet . please help



<form name="font_select" action="GET">
<input
type="button"
onclick="javascript:fontsizedown();"
value=" font - "
/>
<input
type="button"
onclick="javascript:fontsizeup()"
value=" font + "
/>
</form>
Sep 26 '07 #1
4 6952
Death Slaught
1,137 1GB
how do you subtitute image instead of button

for example: i have this code below:
and it has a defualt button. how do i replace it with a image button.
i dont have a image yet . please help



[HTML]<form name="font_select" action="GET">
<input
type="button"
onclick="javascript:fontsizedown();"
value=" font - "
/>
<input
type="button"
onclick="javascript:fontsizeup()"
value=" font + "
/>
</form>[/HTML]
Sup silviasalsa, please use proper code tags when posting code, please read the posting guidelines .

I assume that your wanting to know how to add certain attributes to your image code, like "onblur, onfocus, onclick, onmouseover, onmouseout....etc." just add the attribute to your code like this:

[HTML]<img src="location of image" alt="text to be displayed if image encounters an error" border="0" onclick="alert('text')" />[/HTML]



Hope it helps, Death
Sep 26 '07 #2
drhowarddrfine
7,435 Expert 4TB
No, I think he just wants a button image. So:
<button name="submit" value="submit" type="submit"><img src="1.png">

Of course, much more can be done to style that.
Sep 26 '07 #3
Hi Silvia,
You can few modifications, as mentioned below, in your code
<input type="IMAGE" value="button" src="<image name>"/>
hope this one will work...revert in case of concerns....till thn happy coding...:)

how do you subtitute image instead of button

for example: i have this code below:
and it has a defualt button. how do i replace it with a image button.
i dont have a image yet . please help



<form name="font_select" action="GET">
<input
type="button"
onclick="javascript:fontsizedown();"
value=" font - "
/>
<input
type="button"
onclick="javascript:fontsizeup()"
value=" font + "
/>
</form>
Oct 1 '07 #4
numberwhun
3,503 Expert Mod 2GB
how do you subtitute image instead of button

for example: i have this code below:
and it has a defualt button. how do i replace it with a image button.
i dont have a image yet . please help



<form name="font_select" action="GET">
<input
type="button"
onclick="javascript:fontsizedown();"
value=" font - "
/>
<input
type="button"
onclick="javascript:fontsizeup()"
value=" font + "
/>
</form>
And, for a little light reading on the other options of the input tag, check out this link.

Regards,

Jeff
Oct 1 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Ester | last post: by
15 posts views Thread by Anand Ganesh | last post: by
6 posts views Thread by ruca | last post: by
10 posts views Thread by Mirek Endys | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.