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!
for adding image to button you can change type of input from button to image:
you can modify it.
http://jsfiddle.net/6HdnU/