你在寻找这样的东西吗:http: //jsfiddle.net/AyyU6/1/
HTML:
Hover on the links, and see the result
<br>
<a href='#' data-color='#fff000'>Color 1</a>
<a href='#' data-color='#fffaaa'>Color 2</a>
<a href='#' data-color='#333000'>Color 3</a>
<a href='#' data-color='#123000'>Color 4</a>
<a href='#' data-color='#fff555'>Color 5</a>
<div style="width: 100px; height:100px;">
</div>
Javascript:
$('a').mouseenter(function(){
// Getting color information from the links data-color attr, of course it can be anything you define
var color = $(this).attr('data-color');
$('div').css('background-color',color);
})