Changing background image to a button
- by Alpan67
I am trying to change the backgound-image of a button but it doesn't work as I thought !!
the CSS is OK and it is as follows :
ITA{
float:right;
margin : 5px 85px;
width:40px;
height:40px;
background : #FFFFFF url("../ITA_off.png") center center no-repeat;
border:0;
}
my javascript function in the "HEAD" is
function cambiaBandiera() {
test=document.getElementById("ITA");
test.backgroundimage="ITA_on.png";
}
and the button is as follows
input type="button" id="ITA" onClick="cambiaBandiera()"
What's wrong ?
Please HELP !
Thanx in advance
Alex