100
rated 0 times
[
105]
[
5]
/ answers: 1 / hits: 19918
/ 12 Years ago, fri, april 13, 2012, 12:00:00
I have created a button in javascript and I would like to use an image for the button instead of text, but I have not yet found a way to do this. So far the sources I have referenced are not working for me for some reason. What I have so far is as follows
Javascript
var sb=doc.createElement('input');
sb.type='button';
//sb.value='Find';
sb.src = url(/Resources/Icons/appbar.next.rest.png);
sb.style.height='100%';
//sb.style.width='20%';
where my image is locoated in the directory /Resources/Icons/appbar.next.rest.png
in my project. Can someone point me in the right direction as to how to properly use an image for a button? I am new to javascript so any links, code, or directions would be greatly appreciated!
More From » jquery