This:
document.getElementById("#tabs ul li a:hover")
isn't valid syntax, you only need to specify the id there:
document.getElementById("tabs")
You can change the style of an element on hover something like this:
var elem = document.getElementById("id");
elem.onmouseover = function(){
// your code
};
Let's suppose you have assigned the id myid
to your link, you can do the stuff for that like this:
var elem = document.getElementById("myid");
elem.onmouseover = function(){
elem.style.backgroundColor = 'color value';
elem.style.color = 'color value';
};
Update:
Since in your code you are using loadit(this)
in onclick event, you don't need to use document.getElementById
because element is already referenced with this
keyword, also you may want to use the onmouseover
event instead of click
event if you want to something to happen when element is hovered like:
<li><a href="tab-frame-workexperience.html" target="mainFrame" onmouseover="loadit(this)" >Work experience</a></li>
and then your function should look like this:
function loadit(elem)
{
elem.style.color = 'color value';
}
and/or you can create the two functions for two events if you want.
Note also that you can use jQuery to do it easily and in unobstrusive fashion with hover
method:
$(function(){
$('#tabs ul li a').hover(function(){
$(this).css('color', '#ff0000'); // this fires when mouse enters element
}, function(){
$(this).css('color', '#000'); // this fires when mouse leaves element
}
);
});