没明白这个挑战的目的,所以我编了这个?
<!DOCTYP html>
<html>
<head>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
</script>
</head>
<body>
<div>
<ul>
<li>wwwwwwwwww</li>
<li>qqqqqqqqqq</li>
<li>rrrrrrrrrr</li>
<li>wwwwwwwwww</li>
<li>qqqqqqqqqq</li>
<li>rrrrrrrrrr</li>
</ul>
</div>
<div>nihao</div>
<script type="text/javascript">
$(function () {
$("li").hover(
function () {
$(this).css("background-color","red");
},
function () {
$(this).css("background-color","white")
})
});
</script>
</body>
</html>http://www.imooc.com/code/1106 这个算不算满足要求了?