Convert hyphens to camelCase when changing properties of the style object in JS.
backgroundColor
However, you are trying to solve this problem in the wrong way.
If you really wanted to style the list item on hover, then you probably should be using li:hover
in your stylesheet. The only downside is that this won't work in IE 6 (although it is just a cosmetic effect on an ancient browser that is increasingly falling in the "Not supported" box).
That said, having a hover effect shouts "You can click now!" at the user — but only the link portion of the list item will do anything when clicked. This means that you should style the a
element, not the li
… but style it to fill the list item (and this will work in IE6).
Listamatic has many examples.