<html>
<head>
<script src="jquery-1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("li.text").mouseover(function (){
$("this").css("background-color", "#AEEEEE")
});
$("li.text").mouseout(function (){
$("this").css("background-color", "red")
});
}); </script>
<style>
.text {
width:500px;
height:50px;
background-color:#A020F0;
position:absolute;
left:20px;
top:20px;
}
.text ul li{
list-style:none;
background-color:red;
width:40px;
margin-left:10px;
margin-top:10px;
float:left;
}
</style>
</head>
<body>
<div class="text">
<ul class="text1">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
</body>
</htm
<head>
<script src="jquery-1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("li.text").mouseover(function (){
$("this").css("background-color", "#AEEEEE")
});
$("li.text").mouseout(function (){
$("this").css("background-color", "red")
});
}); </script>
<style>
.text {
width:500px;
height:50px;
background-color:#A020F0;
position:absolute;
left:20px;
top:20px;
}
.text ul li{
list-style:none;
background-color:red;
width:40px;
margin-left:10px;
margin-top:10px;
float:left;
}
</style>
</head>
<body>
<div class="text">
<ul class="text1">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
</body>
</htm
$(document).ready(function(){
$("#text1 li").mouseover(function (){
$(this).css("background-color", "#AEEEEE")
});
$("#text1 li").mouseout(function (){
$(this).css("background-color", "red")
});
});
</script> </head>
<body>
<div class="text">
<ul class="text1" id="text1">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("li").mouseover(function (){
$(this).css("background-color", "#AEEEEE")
});
$("li").mouseout(function (){
$(this).css("background-color", "red")
});
}); </script>
<style>
.text {
width:500px;
height:50px;
background-color:#A020F0;
position:absolute;
left:20px;
top:20px;
}
.text ul li{
list-style:none;
background-color:red;
width:40px;
margin-left:10px;
margin-top:10px;
float:left;
}
</style>
</head>
<body>
<div class="text">
<ul class="text1">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div> </body>建议楼主 找本书 看看吧。锋利的jquery